Closed Bug 416685 Opened 16 years ago Closed 16 years ago

jsinterp.c warning: empty body in an if-statement (times 4)

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: jag+mozilla, Assigned: jag+mozilla)

Details

Attachments

(1 file, 1 obsolete file)

Attached patch Use JS_{BEGIN,END}_MACRO (obsolete) — Splinter Review
Just a minor warning, but easily addressed:

../../../mozilla/js/src/jsinterp.c: In function 'js_Interpret':
../../../mozilla/js/src/jsinterp.c:3165: warning: empty body in an if-statement
../../../mozilla/js/src/jsinterp.c:3941: warning: empty body in an if-statement
../../../mozilla/js/src/jsinterp.c:4028: warning: empty body in an if-statement
../../../mozilla/js/src/jsinterp.c:4602: warning: empty body in an if-statement
Attachment #302416 - Flags: review?(brendan)
Ugh. How about ((void)0) instead of /* nothing */ and we keep the one-line macro definitions?

/be
I'm fine with that too. I was trying to let us be able to handle code like:

  if (foo)
    PCMETER(a++; b--);

but that's over-kill. New patch coming up.
Attached patch Use ((void)0)Splinter Review
Attachment #302416 - Attachment is obsolete: true
Attachment #302491 - Flags: review?(brendan)
Attachment #302416 - Flags: review?(brendan)
Comment on attachment 302491 [details] [diff] [review]
Use ((void)0)

Thanks, jag.

/be
Attachment #302491 - Flags: review?(brendan)
Attachment #302491 - Flags: review+
Attachment #302491 - Flags: approval1.9+
Checking in jsinterp.h;
/cvsroot/mozilla/js/src/jsinterp.h,v  <--  jsinterp.h
new revision: 3.71; previous revision: 3.70
done
Status: NEW → RESOLVED
Closed: 16 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
Flags: in-litmus-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: