Closed Bug 331 Opened 26 years ago Closed 24 years ago

Superfluous warnings and cleanup

Categories

(MozillaClassic Graveyard :: Preferences, defect, P3)

1998-04-08
defect

Tracking

(Not tracked)

VERIFIED DUPLICATE of bug 330

People

(Reporter: nobody, Assigned: aoki)

Details

Created by (aoki@netscape.com) on Wednesday, May 6, 1998 10:34:23 PM PDT Additional Details : Reported by Brian Grunkemeyer (bg2k@andrew.cmu.edu) Added a default case to a switch to handle some unhandled enum values, but I don't know if that ever comes up, and I don't know if it's a bad thing. So right now it just prints out that it fell through the switch at that file & line number. Maybe there should be an assertion saying someone called the function with the wrong parameters, if these are wrong. Have someone who understands that file check this and do something intelligent. Got rid of some unused variables as well. Apply this patch in modules/libpref/src/. ------------------------------------------------------- ----------------- Index: prefapi.c ======= ========================================================= === RCS file: /cvsroot/mozilla/modules/libpref/src/ prefapi.c,v retrieving revision 3.1 diff -u -r3.1 prefapi.c --- prefapi.c 1998/03/28 03:35:10 3.1 +++ prefapi.c 1998/05/03 00:27:26 @@ -1454,6 +1454,10 @@ case PREF_BOOL: changed = oldValue.boolVal != newValue.boolVal; break; + default: + /* This doesn't handle PREF_LOCKED, PREF_USERSET, + PREF_CONFIG, nor PREF_LILOCAL. Is this bad? */ + fprintf(stderr, "Fell through case in %s at line %d. Is this bad?\n", __FILE__, __LINE__); } return changed; } @@ -1655,9 +1659,8 @@ JSBool PR_CALLBACK pref_NativeGetPref (JSContext *cx, JSObject *obj, unsigned int argc, jsval *argv, jsval *rval) { - void* value = NULL; PrefNode* pref; - XP_Bool prefExists = TRUE; + /* Unused: XP_Bool prefExists = TRUE; */ if (argc >= 1 && JSVAL_IS_STRING(argv[0])) { @@ -2042,7 +2045,6 @@ { char *last; - int i, j, k, n; const char *s, *t; last = PR_sprintf_append(0, "An error occurred reading the startup configuration file. " Updated by (aoki@netscape.com) on Monday, August 17, 1998 9:35:11 AM PDT Additional Details : Duplicate of bug #330
reopen to actually mark as a dup
Status: RESOLVED → REOPENED
*** This bug has been marked as a duplicate of 330 ***
Status: REOPENED → RESOLVED
Closed: 24 years ago
Resolution: --- → DUPLICATE
Status: RESOLVED → VERIFIED
Verified dupe of bug 330 (same bug report)
You need to log in before you can comment on or make changes to this bug.