Closed
Bug 662964
Opened 13 years ago
Closed 13 years ago
Silence the clang warnings issued because of alignment requirements increase when compiling jscntxt.h
Categories
(Core :: JavaScript Engine, defect)
Tracking
()
RESOLVED
FIXED
mozilla7
People
(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)
Details
(Whiteboard: [fixed-in-tracemonkey])
Attachments
(1 file)
945 bytes,
patch
|
Waldo
:
review+
|
Details | Diff | Splinter Review |
These warnings drive me nuts. We get thousands of them when compiling jscntxt.h. jsapi.cpp In file included from /Users/ehsanakhgari/moz/tmp/js/src/jsapi.cpp:61: In file included from /Users/ehsanakhgari/moz/tmp/js/src/jsclone.h:43: /Users/ehsanakhgari/moz/tmp/js/src/jscntxt.h:2279:12: warning: cast from 'uint8 *' (aka 'unsigned char *') to 'JSContext *' increases required alignment from 1 to 8 [-Wcast-align] return (JSContext *) ((uint8 *) link - offsetof(JSContext, link)); ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Assignee | ||
Comment 1•13 years ago
|
||
Comment 2•13 years ago
|
||
Comment on attachment 538142 [details] [diff] [review] Patch (v1) >- return (JSContext *) ((uint8 *) link - offsetof(JSContext, link)); >+ return (JSContext *) (void *) ((uint8 *) link - offsetof(JSContext, link)); Another place where uintptr_t seems better than an extra cast: >+ return reinterpret_cast<JSContext *>(uintptr_t(link) - offsetof(JSContext, link));
Attachment #538142 -
Flags: review?(jwalden+bmo) → review+
Assignee | ||
Comment 3•13 years ago
|
||
http://hg.mozilla.org/tracemonkey/rev/3167cf2cde1c
Whiteboard: [fixed-in-tracemonkey]
Target Milestone: --- → mozilla7
Comment 4•13 years ago
|
||
cdleary-bot mozilla-central merge info: http://hg.mozilla.org/mozilla-central/rev/3167cf2cde1c
Updated•13 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 13 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•