Mercurial > mplayer.hg
diff m_option.c @ 36582:b28f3ff37ae7
Use av_unused for unused arguments instead of various hacks.
author | reimar |
---|---|
date | Mon, 20 Jan 2014 22:08:48 +0000 |
parents | 4e3c56728d1e |
children | d339a982071d |
line wrap: on
line diff
--- a/m_option.c Mon Jan 20 22:08:47 2014 +0000 +++ b/m_option.c Mon Jan 20 22:08:48 2014 +0000 @@ -36,6 +36,7 @@ #include "mp_global.h" #include "stream/url.h" #include "libavutil/avstring.h" +#include "libavutil/attributes.h" // Don't free for 'production' atm #ifndef MP_DEBUG @@ -155,10 +156,9 @@ // Integer -static int parse_int(const m_option_t* opt,const char *name, const char *param, void* dst, int src) { +static int parse_int(const m_option_t* opt,const char *name, const char *param, void* dst, int av_unused src) { long long tmp_int; char *endptr; - src = 0; if (param == NULL) return M_OPT_MISSING_PARAM; @@ -228,10 +228,9 @@ #undef VAL #define VAL(x) (*(double*)(x)) -static int parse_double(const m_option_t* opt,const char *name, const char *param, void* dst, int src) { +static int parse_double(const m_option_t* opt,const char *name, const char *param, void* dst, int av_unused src) { double tmp_float; char* endptr; - src = 0; if (param == NULL) return M_OPT_MISSING_PARAM; @@ -277,8 +276,7 @@ return 1; } -static char* print_double(const m_option_t* opt, const void* val) { - opt = NULL; +static char* print_double(const m_option_t* av_unused opt, const void* val) { return dup_printf("%f",VAL(val)); } @@ -305,8 +303,7 @@ return r; } -static char* print_float(const m_option_t* opt, const void* val) { - opt = NULL; +static char* print_float(const m_option_t* av_unused opt, const void* val) { return dup_printf("%f",VAL(val)); }