From 0fc73fa43deb5f478ec71518a0bece17102918f4 Mon Sep 17 00:00:00 2001 From: "slamm%netscape.com" Date: Sat, 13 Nov 1999 01:36:34 +0000 Subject: [PATCH] Fix build warnings. r=sspitzer --- modules/libpref/src/prefapi.c | 34 +++++++++++++++++---------------- modules/libpref/src/prefapi.cpp | 34 +++++++++++++++++---------------- 2 files changed, 36 insertions(+), 32 deletions(-) diff --git a/modules/libpref/src/prefapi.c b/modules/libpref/src/prefapi.c index 2b1d7df03963..1f5cdec6135f 100644 --- a/modules/libpref/src/prefapi.c +++ b/modules/libpref/src/prefapi.c @@ -142,29 +142,31 @@ JSObject * gGlobalConfigObject = NULL; JSClass global_class = { "global", 0, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, - JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub + JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub, + JSCLASS_NO_OPTIONAL_MEMBERS }; JSClass autoconf_class = { "PrefConfig", 0, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, - JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub + JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub, + JSCLASS_NO_OPTIONAL_MEMBERS }; JSPropertySpec autoconf_props[] = { - {0} + {0,0,0,0,0} }; JSFunctionSpec autoconf_methods[] = { - { "pref", pref_NativeDefaultPref, 2 }, - { "defaultPref", pref_NativeDefaultPref, 2 }, - { "user_pref", pref_NativeUserPref, 2 }, - { "lockPref", pref_NativeLockPref, 2 }, - { "unlockPref", pref_NativeUnlockPref, 1 }, - { "config", pref_NativeSetConfig, 2 }, - { "getPref", pref_NativeGetPref, 1 }, - { "getLDAPAttributes", pref_NativeGetLDAPAttr, 4 }, - { "localPref", pref_NativeLILocalPref, 1 }, - { "localUserPref", pref_NativeLIUserPref, 2 }, - { "localDefPref", pref_NativeLIDefPref, 2 }, - { NULL, NULL, 0 } + { "pref", pref_NativeDefaultPref, 2,0,0 }, + { "defaultPref", pref_NativeDefaultPref, 2,0,0 }, + { "user_pref", pref_NativeUserPref, 2,0,0 }, + { "lockPref", pref_NativeLockPref, 2,0,0 }, + { "unlockPref", pref_NativeUnlockPref, 1,0,0 }, + { "config", pref_NativeSetConfig, 2,0,0 }, + { "getPref", pref_NativeGetPref, 1,0,0 }, + { "getLDAPAttributes", pref_NativeGetLDAPAttr, 4,0,0 }, + { "localPref", pref_NativeLILocalPref, 1,0,0 }, + { "localUserPref", pref_NativeLIUserPref, 2,0,0 }, + { "localDefPref", pref_NativeLIDefPref, 2,0,0 }, + { NULL, NULL, 0,0,0 } }; #ifdef PREF_SUPPORT_OLD_PATH_STRINGS @@ -1180,7 +1182,7 @@ PREF_SetSpecialPrefsLocal(void) "profile.directory" }; PrefNode* pref; - int i; + PRUint32 i; if (!gHashTable) return PREF_NOT_INITIALIZED; diff --git a/modules/libpref/src/prefapi.cpp b/modules/libpref/src/prefapi.cpp index 2b1d7df03963..1f5cdec6135f 100644 --- a/modules/libpref/src/prefapi.cpp +++ b/modules/libpref/src/prefapi.cpp @@ -142,29 +142,31 @@ JSObject * gGlobalConfigObject = NULL; JSClass global_class = { "global", 0, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, - JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub + JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub, + JSCLASS_NO_OPTIONAL_MEMBERS }; JSClass autoconf_class = { "PrefConfig", 0, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, JS_PropertyStub, - JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub + JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, JS_FinalizeStub, + JSCLASS_NO_OPTIONAL_MEMBERS }; JSPropertySpec autoconf_props[] = { - {0} + {0,0,0,0,0} }; JSFunctionSpec autoconf_methods[] = { - { "pref", pref_NativeDefaultPref, 2 }, - { "defaultPref", pref_NativeDefaultPref, 2 }, - { "user_pref", pref_NativeUserPref, 2 }, - { "lockPref", pref_NativeLockPref, 2 }, - { "unlockPref", pref_NativeUnlockPref, 1 }, - { "config", pref_NativeSetConfig, 2 }, - { "getPref", pref_NativeGetPref, 1 }, - { "getLDAPAttributes", pref_NativeGetLDAPAttr, 4 }, - { "localPref", pref_NativeLILocalPref, 1 }, - { "localUserPref", pref_NativeLIUserPref, 2 }, - { "localDefPref", pref_NativeLIDefPref, 2 }, - { NULL, NULL, 0 } + { "pref", pref_NativeDefaultPref, 2,0,0 }, + { "defaultPref", pref_NativeDefaultPref, 2,0,0 }, + { "user_pref", pref_NativeUserPref, 2,0,0 }, + { "lockPref", pref_NativeLockPref, 2,0,0 }, + { "unlockPref", pref_NativeUnlockPref, 1,0,0 }, + { "config", pref_NativeSetConfig, 2,0,0 }, + { "getPref", pref_NativeGetPref, 1,0,0 }, + { "getLDAPAttributes", pref_NativeGetLDAPAttr, 4,0,0 }, + { "localPref", pref_NativeLILocalPref, 1,0,0 }, + { "localUserPref", pref_NativeLIUserPref, 2,0,0 }, + { "localDefPref", pref_NativeLIDefPref, 2,0,0 }, + { NULL, NULL, 0,0,0 } }; #ifdef PREF_SUPPORT_OLD_PATH_STRINGS @@ -1180,7 +1182,7 @@ PREF_SetSpecialPrefsLocal(void) "profile.directory" }; PrefNode* pref; - int i; + PRUint32 i; if (!gHashTable) return PREF_NOT_INITIALIZED;