# HG changeset patch # User alex # Date 1062357333 0 # Node ID 3e57b9c079b6e72e467681274936ccda60a52e0a # Parent 8a10d5d0ce86e9253527cff5ceb0441cbc39556e Handle mp_msg like printf so compiler can report if missing/too much arguments or other errors happen. GCC only diff -r 8a10d5d0ce86 -r 3e57b9c079b6 mp_msg.h --- 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