[webkit-reviews] review requested: [Bug 58172] Fix -Wcast-align warning in WebBasePluginPackage.mm : [Attachment 88891] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Fri Apr 8 16:10:58 PDT 2011

David Kilzer (ddkilzer) <ddkilzer at webkit.org> has asked  for review:
Bug 58172: Fix -Wcast-align warning in WebBasePluginPackage.mm

Attachment 88891: Patch

------- Additional Comments from David Kilzer (ddkilzer) <ddkilzer at webkit.org>
Reviewed by NOBODY (OOPS!).

Fixes the following warning with -Wcast-align enabled:

-402:93}: error: cast from 'uint8_t *' (aka 'unsigned char *') to 'struct
fat_arch *' increases required alignment from 1 to 4 [-Werror,-Wcast-align,3]
archs = (struct fat_arch*)((uint8_t*)rawData.data() + sizeof(struct

* Plugins/WebBasePluginPackage.mm:
(-[WebBasePluginPackage isNativeLibraryData:]): Remove cast to
(uint8_t*).  The rawData Vector uses a type of uint32_t, and
struct fat_header contains two uint32_t data members, so there
is no need to cast to uint8_t* here.
 2 files changed, 19 insertions(+), 1 deletions(-)

More information about the webkit-reviews mailing list