WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
58172
Fix -Wcast-align warning in WebBasePluginPackage.mm
https://bugs.webkit.org/show_bug.cgi?id=58172
Summary
Fix -Wcast-align warning in WebBasePluginPackage.mm
David Kilzer (:ddkilzer)
Reported
2011-04-08 16:10:58 PDT
Created
attachment 88891
[details]
Patch Reviewed by NOBODY (OOPS!). Fixes the following warning with -Wcast-align enabled: Source/WebKit/mac/Plugins/WebBasePluginPackage.mm:402:21:{402:21-402:93}{402:39-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 fat_header)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ * 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(-)
Attachments
Patch
(2.25 KB, patch)
2011-04-08 16:10 PDT
,
David Kilzer (:ddkilzer)
ddkilzer
: review-
Details
Formatted Diff
Diff
Patch v2
(3.49 KB, patch)
2011-04-08 17:31 PDT
,
David Kilzer (:ddkilzer)
andersca
: review+
Details
Formatted Diff
Diff
Show Obsolete
(1)
View All
Add attachment
proposed patch, testcase, etc.
WebKit Review Bot
Comment 1
2011-04-08 16:13:46 PDT
Attachment 88891
[details]
did not pass style-queue: Failed to run "['Tools/Scripts/check-webkit-style', '--diff-files', u'Source/WebKit/mac/ChangeLog', u'Source/Web..." exit_code: 1 Source/WebKit/mac/ChangeLog:1: ChangeLog entry has no bug number [changelog/bugnumber] [5] Total errors found: 1 in 2 files If any of these errors are false positives, please file a bug against check-webkit-style.
David Kilzer (:ddkilzer)
Comment 2
2011-04-08 16:40:17 PDT
Comment on
attachment 88891
[details]
Patch Cameron pointed out that my pointer math is incorrect. New patch forthcoming.
David Kilzer (:ddkilzer)
Comment 3
2011-04-08 17:31:22 PDT
Created
attachment 88907
[details]
Patch v2
David Kilzer (:ddkilzer)
Comment 4
2011-04-13 12:31:10 PDT
Committed
r83755
: <
http://trac.webkit.org/changeset/83755
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug