[Mplayer-cvslog] CVS: main mp_msg.h,1.27,1.28

Alex Beregszaszi alex at mplayerhq.hu
Sun Aug 31 21:16:09 CEST 2003


Update of /cvsroot/mplayer/main
In directory mail:/var/tmp.root/cvs-serv23108

Modified Files:
	mp_msg.h 
Log Message:
Handle mp_msg like printf so compiler can report if missing/too much arguments or other errors happen. GCC only

Index: mp_msg.h
===================================================================
RCS file: /cvsroot/mplayer/main/mp_msg.h,v
retrieving revision 1.27
retrieving revision 1.28
diff -u -r1.27 -r1.28
--- mp_msg.h	6 Apr 2003 17:18:26 -0000	1.27
+++ mp_msg.h	31 Aug 2003 19:15:33 -0000	1.28
@@ -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



More information about the MPlayer-cvslog mailing list