Add GCC format attribute to JaegerSpew. (Bug 676577, r=sstangl)
authorMarty Rosenberg <mrosenberg@mozilla.com>
Wed, 10 Aug 2011 17:36:07 -0700
changeset 74239 66d6bdbdd200c36b08e01a6525035ead71faec3c
parent 74238 17fa5a741f845f934cd51178974b6e453b4b3183
child 74240 8eb72ae5ac5e1e6d2cd87261e71f24ce6b53a0a4
push id2
push userbsmedberg@mozilla.com
push dateFri, 19 Aug 2011 14:38:13 +0000
reviewerssstangl
bugs676577
milestone8.0a1
Add GCC format attribute to JaegerSpew. (Bug 676577, r=sstangl)
js/src/methodjit/Logging.h
--- a/js/src/methodjit/Logging.h
+++ b/js/src/methodjit/Logging.h
@@ -70,17 +70,21 @@ enum JaegerSpewChannel {
 # define JS_METHODJIT_SPEW
 #endif
 
 #if defined(JS_METHODJIT_SPEW)
 
 void JMCheckLogging();
 
 bool IsJaegerSpewChannelActive(JaegerSpewChannel channel);
+#ifdef __GNUC__
+void JaegerSpew(JaegerSpewChannel channel, const char *fmt, ...) __attribute__ ((format (printf, 2, 3)));
+#else
 void JaegerSpew(JaegerSpewChannel channel, const char *fmt, ...);
+#endif
 
 struct Profiler {
     JSInt64 t_start;
     JSInt64 t_stop;
 
     static inline JSInt64 now() {
         return PRMJ_Now();
     }