Closed Bug 485576 Opened 15 years ago Closed 15 years ago

Fix a few minor gcc warnings in jsemit, jsexn, jsopcode, jsxml

Categories

(Core :: JavaScript Engine, defect)

defect
Not set
minor

Tracking

()

RESOLVED FIXED

People

(Reporter: andrew, Assigned: andrew)

Details

(Keywords: fixed1.9.1, Whiteboard: fixed-in-tracemonkey)

Attachments

(1 file)

Fixes one -Wredundant-decls (exn_finalize declared twice) and a few -Wextra (enumerator and a non-enumerator both appear in a conditional expression) warnings.
Attachment #369714 - Flags: review?(igor)
Attachment #369714 - Flags: review?(igor) → review+
Keywords: checkin-needed
Thanks! http://hg.mozilla.org/tracemonkey/rev/20a983740d48
Assignee: general → andrew
Status: NEW → RESOLVED
Closed: 15 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Whiteboard: fixed-in-tracemonkey
Oops, fixed-in-tracemonkey, not yet on mozilla-central.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Comment on attachment 369714 [details] [diff] [review]
patch to fix gcc warnings

>+    ss->opcodes[top] = (op == JSOP_GETPROP2) ? (jsbytecode) JSOP_GETPROP
>+                     : (op == JSOP_GETELEM2) ? (jsbytecode) JSOP_GETELEM
>                      : (jsbytecode) op;

Drive-by, belated: write jsbytecode(...) once, on the outside.

>+    switch (vxml ? (JSXMLClass) vxml->xml_class : JSXML_CLASS_LIMIT) {

C++ constructor-style cast here too.

/be
http://hg.mozilla.org/mozilla-central/rev/20a983740d48
Status: REOPENED → RESOLVED
Closed: 15 years ago15 years ago
Resolution: --- → FIXED
Flags: in-testsuite-
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: