mirror of https://github.com/mpv-player/mpv
configure, mp_msg.h: get rid of MP_DEBUG
The function mp_dbg() was silent if MP_DEBUG was not defined. MP_DEBUG was defined only if configure was invoked with --enable-debug. Remove it and make mp_dbg an alias to mp_msg. This has the advantage tha --enable-debug changes less. (It only adds -g now and disables stripping the binary on installation.) Using log levels is the better way to silence annoying debug messages.
This commit is contained in:
parent
6009965cdd
commit
7349d39938
|
@ -4232,9 +4232,6 @@ fi
|
|||
extra_ldflags="$extra_ldflags $_ld_pthread $_ld_dl $_ld_dl_dynamic"
|
||||
(netbsd || openbsd) && x86_32 && extra_ldflags="$extra_ldflags -li386"
|
||||
|
||||
def_debug='#undef MP_DEBUG'
|
||||
test "$_debug" != "" && def_debug='#define MP_DEBUG 1'
|
||||
|
||||
|
||||
echocheck "joystick"
|
||||
def_joystick='#undef CONFIG_JOYSTICK'
|
||||
|
|
12
mp_msg.h
12
mp_msg.h
|
@ -138,17 +138,7 @@ void mp_msg_va(int mod, int lev, const char *format, va_list va);
|
|||
|
||||
void mp_msg(int mod, int lev, const char *format, ... ) PRINTF_ATTRIBUTE(3, 4);
|
||||
void mp_tmsg(int mod, int lev, const char *format, ... ) PRINTF_ATTRIBUTE(3, 4);
|
||||
static inline void mp_dbg(int mod, int lev, const char *format, ...) PRINTF_ATTRIBUTE(3, 4);
|
||||
|
||||
static inline void mp_dbg(int mod, int lev, const char *format, ...)
|
||||
{
|
||||
#ifdef MP_DEBUG
|
||||
va_list va;
|
||||
va_start(va, format);
|
||||
mp_msg_va(mod, lev, format, va);
|
||||
va_end(va);
|
||||
#endif
|
||||
}
|
||||
#define mp_dbg mp_msg
|
||||
|
||||
const char* filename_recode(const char* filename);
|
||||
|
||||
|
|
Loading…
Reference in New Issue