Mercurial > mplayer.hg
changeset 33356:bf994e94e70a
Change mp_dbg so that syntax is checked also when it is disabled.
This also avoids many false "unused variable" warnings.
author | reimar |
---|---|
date | Sun, 08 May 2011 10:48:39 +0000 |
parents | 6a6dc18cde26 |
children | 5a5c875e7392 |
files | mp_msg.h |
diffstat | 1 files changed, 4 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mp_msg.h Sun May 08 10:46:41 2011 +0000 +++ b/mp_msg.h Sun May 08 10:48:39 2011 +0000 @@ -148,14 +148,16 @@ # ifdef MP_DEBUG # define mp_dbg(mod,lev, args... ) mp_msg(mod, lev, ## args ) # else -# define mp_dbg(mod,lev, args... ) /* only useful for developers */ + // only useful for developers, disable but check syntax +# define mp_dbg(mod,lev, args... ) do { if (0) mp_msg(mod, lev, ## args ); } while (0) # endif #else // not GNU C void mp_msg(int mod, int lev, const char *format, ... ); # ifdef MP_DEBUG # define mp_dbg(mod,lev, ... ) mp_msg(mod, lev, __VA_ARGS__) # else -# define mp_dbg(mod,lev, ... ) /* only useful for developers */ + // only useful for developers, disable but check syntax +# define mp_dbg(mod,lev, ... ) do { if (0) mp_msg(mod, lev, __VA_ARGS__); } while (0) # endif #endif /* __GNUC__ */