Closed
Bug 330
Opened 26 years ago
Closed 26 years ago
Superfluous warnings and cleanup
Categories
(MozillaClassic Graveyard :: Preferences, defect, P3)
Tracking
(Not tracked)
VERIFIED
WONTFIX
M4
People
(Reporter: aoki, Assigned: aoki)
References
Details
Created by (null) 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. "
Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 1•26 years ago
|
||
Fix will be included as part of the 4.5 profile manager merge to tip.
Updated•26 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → WONTFIX
Comment 3•26 years ago
|
||
old codebase
You need to log in
before you can comment on or make changes to this bug.
Description
•