Bug 679346 - Fix GCC warning "‘void UnsafeError(const char*, ...)’ defined but not used" in jsdbgapi.cpp. r=gal.
authorJason Orendorff <jorendorff@mozilla.com>
Tue, 16 Aug 2011 11:36:56 -0500
changeset 75402 47ae156df73fcd85dc5389c0d8ccd37e25fa20d3
parent 75401 c377771c2ecdbf6a77f81f2e7632acea10cd17f2
child 75403 d9ec7a44e2ab399ecc0b7841a338687280cd6a6a
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewersgal
bugs679346
milestone8.0a1
Bug 679346 - Fix GCC warning "‘void UnsafeError(const char*, ...)’ defined but not used" in jsdbgapi.cpp. r=gal.
js/src/jsdbgapi.cpp
--- a/js/src/jsdbgapi.cpp
+++ b/js/src/jsdbgapi.cpp
@@ -1222,17 +1222,17 @@ JS_ClearContextDebugHooks(JSContext *cx)
 
 /* Profiling-related API */
 
 /* Thread-unsafe error management */
 
 static char gLastError[2000];
 
 static void
-#ifdef _GNU_SOURCE
+#ifdef __GNUC__
 __attribute__((unused,format(printf,1,2)))
 #endif
 UnsafeError(const char *format, ...)
 {
     va_list args;
     va_start(args, format);
     (void) vsnprintf(gLastError, sizeof(gLastError), format, args);
     va_end(args);