Bug 485576 - Fix a few minor gcc warnings. r=igor

This commit is contained in:
Andrew Paprocki 2009-03-27 15:45:48 -07:00
parent 2a8f257f6d
commit 24b97dd380
4 changed files with 5 additions and 8 deletions

View File

@ -6282,8 +6282,8 @@ js_EmitTree(JSContext *cx, JSCodeGenerator *cg, JSParseNode *pn)
break;
}
JS_ASSERT(pn->pn_type == TOK_XMLLIST || pn->pn_count != 0);
switch (pn->pn_head ? pn->pn_head->pn_type : TOK_XMLLIST) {
JS_ASSERT(PN_TYPE(pn) == TOK_XMLLIST || pn->pn_count != 0);
switch (pn->pn_head ? PN_TYPE(pn->pn_head) : TOK_XMLLIST) {
case TOK_XMLETAGO:
JS_ASSERT(0);
/* FALL THROUGH */

View File

@ -66,9 +66,6 @@
static JSBool
Exception(JSContext *cx, JSObject *obj, uintN argc, jsval *argv, jsval *rval);
static void
exn_finalize(JSContext *cx, JSObject *obj);
static void
exn_trace(JSTracer *trc, JSObject *obj);

View File

@ -969,8 +969,8 @@ PushOff(SprintStack *ss, ptrdiff_t off, JSOp op)
/* The opcodes stack must contain real bytecodes that index js_CodeSpec. */
ss->offsets[top] = off;
ss->opcodes[top] = (op == JSOP_GETPROP2) ? JSOP_GETPROP
: (op == JSOP_GETELEM2) ? JSOP_GETELEM
ss->opcodes[top] = (op == JSOP_GETPROP2) ? (jsbytecode) JSOP_GETPROP
: (op == JSOP_GETELEM2) ? (jsbytecode) JSOP_GETELEM
: (jsbytecode) op;
ss->top = ++top;
AddParenSlop(ss);

View File

@ -3754,7 +3754,7 @@ Replace(JSContext *cx, JSXML *xml, uint32 i, jsval v)
vxml = (JSXML *) JS_GetPrivate(cx, vobj);
}
switch (vxml ? vxml->xml_class : JSXML_CLASS_LIMIT) {
switch (vxml ? (JSXMLClass) vxml->xml_class : JSXML_CLASS_LIMIT) {
case JSXML_CLASS_ELEMENT:
/* OPTION: enforce that descendants have superset namespaces. */
if (!CheckCycle(cx, xml, vxml))