changeset 10736:3e57b9c079b6

Handle mp_msg like printf so compiler can report if missing/too much arguments or other errors happen. GCC only
author alex
date Sun, 31 Aug 2003 19:15:33 +0000
parents 8a10d5d0ce86
children af906af4cf18
files mp_msg.h
diffstat 1 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mp_msg.h	Sun Aug 31 18:51:05 2003 +0000
+++ b/mp_msg.h	Sun Aug 31 19:15:33 2003 +0000
@@ -107,9 +107,8 @@
 #define mp_gettext(String) String
 #endif
 
-void mp_msg_c( int x, const char *format, ... );
-
 #ifdef __GNUC__
+void mp_msg_c( int x, const char *format, ... ) __attribute__ ((format (printf, 2, 3)));
 #define mp_msg(mod,lev, args... ) mp_msg_c(((mod)<<8)|(lev), ## args )
 
 #ifdef MP_DEBUG
@@ -119,6 +118,7 @@
 #define mp_dbg(mod,lev, args... ) 
 #endif
 #else // not GNU C
+void mp_msg_c( int x, const char *format, ... );
 #define mp_msg(mod,lev, ... ) mp_msg_c(((mod)<<8)|(lev), __VA_ARGS__)
 
 #ifdef MP_DEBUG