[FFmpeg-cvslog] avfilter: avoid zero arguments to variadic macro

Ganesh Ajjanagadde git at videolan.org
Sat Oct 24 16:20:09 CEST 2015


ffmpeg | branch: master | Ganesh Ajjanagadde <gajjanagadde at gmail.com> | Fri Oct 23 12:36:52 2015 -0400| [683462911db5ba1b17c32c523cdefe921f5aaf17] | committer: Ganesh Ajjanagadde

avfilter: avoid zero arguments to variadic macro

ISO C requires at least one argument in the place of the ellipsis in a
variadic macro. In particular, under -pedantic, this triggers the
warning -Wgnu-zero-variadic-macro-arguments on clang 3.7.

Reviewed-by: Nicolas George <george at nsup.org>
Signed-off-by: Ganesh Ajjanagadde <gajjanagadde at gmail.com>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=683462911db5ba1b17c32c523cdefe921f5aaf17
---

 libavfilter/af_asetrate.c |    4 ++--
 libavfilter/asrc_sine.c   |   18 +++++++++---------
 2 files changed, 11 insertions(+), 11 deletions(-)

diff --git a/libavfilter/af_asetrate.c b/libavfilter/af_asetrate.c
index 409c48f..66febd7 100644
--- a/libavfilter/af_asetrate.c
+++ b/libavfilter/af_asetrate.c
@@ -39,8 +39,8 @@ typedef struct {
     OPT_GENERIC(name, field, def, min, max, descr, INT, i64, __VA_ARGS__)
 
 static const AVOption asetrate_options[] = {
-    OPT_INT("sample_rate", sample_rate, 44100, 1, INT_MAX, "set the sample rate"),
-    OPT_INT("r",           sample_rate, 44100, 1, INT_MAX, "set the sample rate"),
+    OPT_INT("sample_rate", sample_rate, 44100, 1, INT_MAX, "set the sample rate",),
+    OPT_INT("r",           sample_rate, 44100, 1, INT_MAX, "set the sample rate",),
     {NULL},
 };
 
diff --git a/libavfilter/asrc_sine.c b/libavfilter/asrc_sine.c
index cd43ae4..f361faa 100644
--- a/libavfilter/asrc_sine.c
+++ b/libavfilter/asrc_sine.c
@@ -67,15 +67,15 @@ typedef struct {
     OPT_GENERIC(name, field, def, min, max, descr, STRING, str, __VA_ARGS__)
 
 static const AVOption sine_options[] = {
-    OPT_DBL("frequency",         frequency,            440, 0, DBL_MAX,   "set the sine frequency"),
-    OPT_DBL("f",                 frequency,            440, 0, DBL_MAX,   "set the sine frequency"),
-    OPT_DBL("beep_factor",       beep_factor,            0, 0, DBL_MAX,   "set the beep fequency factor"),
-    OPT_DBL("b",                 beep_factor,            0, 0, DBL_MAX,   "set the beep fequency factor"),
-    OPT_INT("sample_rate",       sample_rate,        44100, 1, INT_MAX,   "set the sample rate"),
-    OPT_INT("r",                 sample_rate,        44100, 1, INT_MAX,   "set the sample rate"),
-    OPT_DUR("duration",          duration,               0, 0, INT64_MAX, "set the audio duration"),
-    OPT_DUR("d",                 duration,               0, 0, INT64_MAX, "set the audio duration"),
-    OPT_STR("samples_per_frame", samples_per_frame, "1024", 0, 0,         "set the number of samples per frame"),
+    OPT_DBL("frequency",         frequency,            440, 0, DBL_MAX,   "set the sine frequency",),
+    OPT_DBL("f",                 frequency,            440, 0, DBL_MAX,   "set the sine frequency",),
+    OPT_DBL("beep_factor",       beep_factor,            0, 0, DBL_MAX,   "set the beep fequency factor",),
+    OPT_DBL("b",                 beep_factor,            0, 0, DBL_MAX,   "set the beep fequency factor",),
+    OPT_INT("sample_rate",       sample_rate,        44100, 1, INT_MAX,   "set the sample rate",),
+    OPT_INT("r",                 sample_rate,        44100, 1, INT_MAX,   "set the sample rate",),
+    OPT_DUR("duration",          duration,               0, 0, INT64_MAX, "set the audio duration",),
+    OPT_DUR("d",                 duration,               0, 0, INT64_MAX, "set the audio duration",),
+    OPT_STR("samples_per_frame", samples_per_frame, "1024", 0, 0,         "set the number of samples per frame",),
     {NULL}
 };
 



More information about the ffmpeg-cvslog mailing list