diff --git a/js/src/jsdhash.c b/js/src/jsdhash.c index 199c17d4d22f..295883b2fdfe 100644 --- a/js/src/jsdhash.c +++ b/js/src/jsdhash.c @@ -77,8 +77,8 @@ #else #define ENTRY_STORE_EXTRA 0 -#define INCREMENT_RECURSION_LEVEL(table_) 1 -#define DECREMENT_RECURSION_LEVEL(table_) 0 +#define INCREMENT_RECURSION_LEVEL(table_) ((void)1) +#define DECREMENT_RECURSION_LEVEL(table_) ((void)0) #endif /* defined(DEBUG) */ diff --git a/js/src/plify_jsdhash.sed b/js/src/plify_jsdhash.sed index 9c742f407ae7..eff4901c5fe6 100644 --- a/js/src/plify_jsdhash.sed +++ b/js/src/plify_jsdhash.sed @@ -28,5 +28,6 @@ s/JS_PUBLIC_API(\([^()]*\))/\1/ s/JS_DLL_CALLBACK/PR_CALLBACK/ s/JS_STATIC_DLL_CALLBACK/PR_STATIC_CALLBACK/ s/JS_NewDHashTable/PL_NewDHashTable/ +s/JS_ASSERT(0)/NS_NOTREACHED("0")/ s/\( *\)JS_ASSERT(\(.*\));/\1NS_ASSERTION(\2,\n\1 "\2");/ s/JS_/PR_/g diff --git a/xpcom/glue/pldhash.c b/xpcom/glue/pldhash.c index dda78660c5b5..ee715bd66d64 100644 --- a/xpcom/glue/pldhash.c +++ b/xpcom/glue/pldhash.c @@ -78,8 +78,8 @@ #else #define ENTRY_STORE_EXTRA 0 -#define INCREMENT_RECURSION_LEVEL(table_) 1 -#define DECREMENT_RECURSION_LEVEL(table_) 0 +#define INCREMENT_RECURSION_LEVEL(table_) ((void)1) +#define DECREMENT_RECURSION_LEVEL(table_) ((void)0) #endif /* defined(DEBUG) */ @@ -632,8 +632,7 @@ PL_DHashTableOperate(PLDHashTable *table, const void *key, PLDHashOperator op) break; default: - NS_ASSERTION(0, - "0"); + NS_NOTREACHED("0"); entry = NULL; }