Mercurial > mplayer.hg
comparison mp_msg.h @ 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 | 7af3e6f901fd |
children |
comparison
equal
deleted
inserted
replaced
33355:6a6dc18cde26 | 33356:bf994e94e70a |
---|---|
146 #ifdef __GNUC__ | 146 #ifdef __GNUC__ |
147 void mp_msg(int mod, int lev, const char *format, ... ) __attribute__ ((format (printf, 3, 4))); | 147 void mp_msg(int mod, int lev, const char *format, ... ) __attribute__ ((format (printf, 3, 4))); |
148 # ifdef MP_DEBUG | 148 # ifdef MP_DEBUG |
149 # define mp_dbg(mod,lev, args... ) mp_msg(mod, lev, ## args ) | 149 # define mp_dbg(mod,lev, args... ) mp_msg(mod, lev, ## args ) |
150 # else | 150 # else |
151 # define mp_dbg(mod,lev, args... ) /* only useful for developers */ | 151 // only useful for developers, disable but check syntax |
152 # define mp_dbg(mod,lev, args... ) do { if (0) mp_msg(mod, lev, ## args ); } while (0) | |
152 # endif | 153 # endif |
153 #else // not GNU C | 154 #else // not GNU C |
154 void mp_msg(int mod, int lev, const char *format, ... ); | 155 void mp_msg(int mod, int lev, const char *format, ... ); |
155 # ifdef MP_DEBUG | 156 # ifdef MP_DEBUG |
156 # define mp_dbg(mod,lev, ... ) mp_msg(mod, lev, __VA_ARGS__) | 157 # define mp_dbg(mod,lev, ... ) mp_msg(mod, lev, __VA_ARGS__) |
157 # else | 158 # else |
158 # define mp_dbg(mod,lev, ... ) /* only useful for developers */ | 159 // only useful for developers, disable but check syntax |
160 # define mp_dbg(mod,lev, ... ) do { if (0) mp_msg(mod, lev, __VA_ARGS__); } while (0) | |
159 # endif | 161 # endif |
160 #endif /* __GNUC__ */ | 162 #endif /* __GNUC__ */ |
161 | 163 |
162 const char* filename_recode(const char* filename); | 164 const char* filename_recode(const char* filename); |
163 | 165 |