../../../WebCore/bindings/js/SerializedScriptValue.cpp:871: warning: cast from 'const uint8_t*' to 'const UChar*' increases required alignment of target type ../../../WebCore/bindings/js/SerializedScriptValue.cpp:783: warning: cast from 'const uint8_t*' to 'const uint32_t*' increases required alignment of target type ../../../WebCore/bindings/js/SerializedScriptValue.cpp:783: warning: cast from 'const uint8_t*' to 'const short unsigned int*' increases required alignment of target type ../../../WebCore/bindings/js/SerializedScriptValue.cpp:783: warning: cast from 'const uint8_t*' to 'const long long unsigned int*' increases required alignment of target type ../../../WebCore/plugins/PluginDatabase.cpp:510: warning: cast from 'char*' to 'time_t*' increases required alignment of target type SerializedScriptValue.cpp: --------------------------- static bool readString(const uint8_t*& ptr, const uint8_t* end, UString& str, unsigned length) { ... str = UString(reinterpret_cast<const UChar*>(ptr), length); // <-- line 871 ... } template <typename T> static bool readLittleEndian(const uint8_t*& ptr, const uint8_t* end, T& value) { ... value = *reinterpret_cast<const T*>(ptr); // <-- line 783 ... } PluginDatabase.cpp: -------------------- static bool readTime(time_t& resultTime, char*& start, const char* end) { ... resultTime = *reinterpret_cast<time_t*>(start); // <-- line 510 ... }
Created attachment 66860 [details] Fix increases required alignment of target type warning on ARM
Comment on attachment 66860 [details] Fix increases required alignment of target type warning on ARM LGTM
Comment on attachment 66860 [details] Fix increases required alignment of target type warning on ARM Clearing flags on attachment: 66860 Committed r67028: <http://trac.webkit.org/changeset/67028>
All reviewed patches have been landed. Closing bug.
Removing the warning doesn't fix the real problem: data in the buffer is not guaranteed to be aligned, so it can cause misaligned memory access on ARM (<v6). Bug 47594 is created for this