Hash :
8d05bf7d
Author :
Date :
2019-01-22T12:34:05
Fix cast-align error
If compiler doesn't inline StructAtOffset, this was an error since we
only disable cast-align at call-site. So, move the cast out.
../src/hb-machinery.hh: In instantiation of 'const Type& StructAtOffset(const void*, unsigned int) [with Type = unsigned int]':
../src/hb-font.cc:146:85: required from here
../src/hb-machinery.hh:63:12: error: cast from 'const char*' to 'const unsigned int*' increases required alignment of target type [-Werror=cast-align]
{ return * reinterpret_cast<const Type*> ((const char *) P + offset); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
../src/hb-machinery.hh: In instantiation of 'Type& StructAtOffset(void*, unsigned int) [with Type = unsigned int]':
../src/hb-font.cc:147:79: required from here
../src/hb-machinery.hh:66:12: error: cast from 'char*' to 'unsigned int*' increases required alignment of target type [-Werror=cast-align]
{ return * reinterpret_cast<Type*> ((char *) P + offset); }
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[](https://travis-ci.org/harfbuzz/harfbuzz) [](https://ci.appveyor.com/project/harfbuzz/harfbuzz) [](https://circleci.com/gh/harfbuzz/harfbuzz) [](https://scan.coverity.com/projects/behdad-harfbuzz) [](https://app.codacy.com/app/behdad/harfbuzz) [](https://codecov.io/gh/harfbuzz/harfbuzz) [](https://coveralls.io/r/harfbuzz/harfbuzz) [ABI Tracker](http://abi-laboratory.pro/tracker/timeline/harfbuzz/) This is HarfBuzz, a text shaping library. For bug reports, mailing list, and other information please visit: http://harfbuzz.org/ For license information, see the file COPYING. Documentation: https://harfbuzz.github.io
README