[FFmpeg-cvslog] cmdutils: fix expected signature for show_colors() function

Stefano Sabatini git at videolan.org
Mon Oct 28 09:44:41 CET 2013


ffmpeg | branch: master | Stefano Sabatini <stefasab at gmail.com> | Mon Oct 28 09:39:38 2013 +0100| [6baf9c4406bcdf1015c9ec8bd6b8c4aef77624ac] | committer: Stefano Sabatini

cmdutils: fix expected signature for show_colors() function

Fix warning:
In file included from ffprobe.c:2557:0:
cmdutils_common_opts.h:17:5: warning: initialization from incompatible pointer type [enabled by default]
cmdutils_common_opts.h:17:5: warning: (near initialization for ‘real_options[16].u.func_arg’) [enabled by default]

Spotted-by: Paul B Mahol

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

 cmdutils.c |    4 +++-
 cmdutils.h |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/cmdutils.c b/cmdutils.c
index 1fbd73c..b10a552 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -1518,7 +1518,7 @@ int show_filters(void *optctx, const char *opt, const char *arg)
     return 0;
 }
 
-void show_colors(void *optctx, const char *opt, const char *arg)
+int show_colors(void *optctx, const char *opt, const char *arg)
 {
     const char *name;
     const uint8_t *rgb;
@@ -1528,6 +1528,8 @@ void show_colors(void *optctx, const char *opt, const char *arg)
 
     for (i = 0; name = av_get_known_color_name(i, &rgb); i++)
         printf("%-32s #%02x%02x%02x\n", name, rgb[0], rgb[1], rgb[2]);
+
+    return 0;
 }
 
 int show_pix_fmts(void *optctx, const char *opt, const char *arg)
diff --git a/cmdutils.h b/cmdutils.h
index 2538f05..2d2afc8 100644
--- a/cmdutils.h
+++ b/cmdutils.h
@@ -492,7 +492,7 @@ int show_sample_fmts(void *optctx, const char *opt, const char *arg);
  * Print a listing containing all the color names and values recognized
  * by the program.
  */
-void show_colors(void *optctx, const char *opt, const char *arg);
+int show_colors(void *optctx, const char *opt, const char *arg);
 
 /**
  * Return a positive value if a line read from standard input



More information about the ffmpeg-cvslog mailing list