Closed Bug 239296 Opened 20 years ago Closed 20 years ago

compile warnings on gcc

Categories

(Core :: JavaScript Engine, defect)

x86
Windows XP
defect
Not set
normal

Tracking

()

RESOLVED WONTFIX

People

(Reporter: bugzilla, Unassigned)

Details

when compiling with gcc on windows:

d:/mozilla/mozilla/js/src/jsregexp.h:102: warning: bit-field `parenCount' type i
nvalid in ISO C
d:/mozilla/mozilla/js/src/jsregexp.h:103: warning: bit-field `flags' type invali
d in ISO C

d:/mozilla/mozilla/js/src/jsgc.c: In function `js_InitGC':
d:/mozilla/mozilla/js/src/jsgc.c:264: warning: statement with no effect
d:/mozilla/mozilla/js/src/jsgc.c:265: warning: statement with no effect
d:/mozilla/mozilla/js/src/jsgc.c:266: warning: statement with no effect
d:/mozilla/mozilla/js/src/jsgc.c:267: warning: statement with no effect
d:/mozilla/mozilla/js/src/jsgc.c:268: warning: statement with no effect
d:/mozilla/mozilla/js/src/jsgc.c:269: warning: statement with no effect

d:/mozilla/mozilla/js/src/jsobj.c: In function `js_InitObjectClass':
d:/mozilla/mozilla/js/src/jsobj.c:1733: warning: statement with no effect
d:/mozilla/mozilla/js/src/jsobj.c: In function `printObj':
d:/mozilla/mozilla/js/src/jsobj.c:3956: warning: int format, jsuint arg (arg 3)
d:/mozilla/mozilla/js/src/jsobj.c: In function `printVal':
d:/mozilla/mozilla/js/src/jsobj.c:3974: warning: int format, jsval arg (arg 3)
These warnings look bogus.
The JS_ASSERT ones are not completely bogus... the equivalent of
PR_BEGIN_MACRO/PR_END_MACRO (maybe just in the non-debug version) may help there...
Hmm, that's a good point.  JS_ASSERT could be done like NS_ASSERTION to quiet those.

When I said these looked bogus, I meant they weren't flagging any functional
problems.  Most of these are correctly warning about something.
The jsregexp.h warnings go away with the fix to bug 169559.  Ignoring that
impending WFM, this bug is WONTFIX.

The JS_ASSERT warnings are bogus, and I can't make JS_ASSERT a statement -- it's
used as an operand in comma expressions in macros that expand into expressions.
I think we can live with known warnings of this sort in debug builds.  I
certainly can.

/be
Status: NEW → RESOLVED
Closed: 20 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.