Closed Bug 610642 Opened 9 years ago Closed 9 years ago

In function ‘JSBool JSID_IS_ZERO(jsid)’: warning: NULL used in arithmetic

Categories

(Core :: JavaScript Engine, defect)

defect
Not set

Tracking

()

RESOLVED FIXED

People

(Reporter: mats, Assigned: dholbert)

References

Details

(Keywords: regression, Whiteboard: [build_warning] fixed-in-tracemonkey)

Attachments

(1 file)

For just about every file I compile I get:
../../dist/include/jsapi.h: In function ‘JSBool JSID_IS_ZERO(jsid)’:
../../dist/include/jsapi.h:332: warning: NULL used in arithmetic

http://hg.mozilla.org/mozilla-central/annotate/7fe44a9f25d4/js/src/jsapi.h#l332

# gcc --version
gcc-4.4.real (Ubuntu 4.4.3-4ubuntu5) 4.4.3

x86-64 Linux
Also happens on Mac OS X.
OS: Linux → All
Hardware: x86_64 → All
Attached patch fix: s/NULL/0/Splinter Review
Trivial fix: just replace
   JSID_BITS(id) == NULL
with
   JSID_BITS(id) == 0

Other preexisting macros in the same file already check against 0.  This just makes the body of this new macro "JSID_IS_ZERO" (added yesterday) match that convention.
Assignee: general → dholbert
Status: NEW → ASSIGNED
Attachment #489225 - Flags: review?
Attachment #489225 - Flags: review?(dmandelin) → review+
Comment on attachment 489225 [details] [diff] [review]
fix: s/NULL/0/

Requesting approval to land. Trivial fix (s/NULL/0/ one-liner), fixes a very-spammy build warning introduced yesterday.
Attachment #489225 - Flags: approval2.0?
Landed: http://hg.mozilla.org/mozilla-central/rev/924808901dce
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
Whiteboard: [build_warning]
http://hg.mozilla.org/tracemonkey/rev/e2f64f43c7e1
Whiteboard: [build_warning] → [build_warning] fixed-in-tracemonkey
ah, thanks -- I didn't realize this was an issue on tracemonkey too, since bug 601457 just mentioned an m-c checkin.
You need to log in before you can comment on or make changes to this bug.