diff --git a/avconv_opt.c b/avconv_opt.c
index dc44986e684cb1a7c454105a17274f9be1864a8a..97ae0a4bf9a55e3550ddc961e4e98a8f5b8361c7 100644
--- a/avconv_opt.c
+++ b/avconv_opt.c
@@ -1760,7 +1760,7 @@ static int opt_filter_complex(const char *opt, const char *arg)
     return 0;
 }
 
-static void show_help(void)
+static int show_help(const char *opt, const char *arg)
 {
     int flags = AV_OPT_FLAG_DECODING_PARAM | AV_OPT_FLAG_ENCODING_PARAM;
     av_log_set_callback(log_callback_help);
@@ -1792,6 +1792,7 @@ static void show_help(void)
     show_help_children(avcodec_get_class(), flags);
     show_help_children(avformat_get_class(), flags);
     show_help_children(sws_get_class(), flags);
+    return 0;
 }
 
 void show_usage(void)
diff --git a/avplay.c b/avplay.c
index 3f2c4256c296175e70560e19cf4983b631d22782..593b38af66eea64b67d0235c5c384783e360b5c1 100644
--- a/avplay.c
+++ b/avplay.c
@@ -224,7 +224,7 @@ typedef struct VideoState {
     int refresh;
 } VideoState;
 
-static void show_help(void);
+static int show_help(const char *opt, const char *arg);
 
 /* options specified by the user */
 static AVInputFormat *file_iformat;
@@ -2922,7 +2922,7 @@ static void show_usage(void)
     printf("\n");
 }
 
-static void show_help(void)
+static int show_help(const char *opt, const char *arg)
 {
     av_log_set_callback(log_callback_help);
     show_usage();
@@ -2949,6 +2949,8 @@ static void show_help(void)
            "down/up             seek backward/forward 1 minute\n"
            "mouse click         seek to percentage in file corresponding to fraction of width\n"
            );
+
+    return 0;
 }
 
 static void opt_input_file(void *optctx, const char *filename)
diff --git a/avprobe.c b/avprobe.c
index 270baccf29165fe96cbe4606f2b683dedea320e3..996a138576fbb04a23ce7fdb0886308e5d57c9a8 100644
--- a/avprobe.c
+++ b/avprobe.c
@@ -868,13 +868,14 @@ static void opt_input_file(void *optctx, const char *arg)
     input_filename = arg;
 }
 
-static void show_help(void)
+static int show_help(const char *opt, const char *arg)
 {
     av_log_set_callback(log_callback_help);
     show_usage();
     show_help_options(options, "Main options:\n", 0, 0);
     printf("\n");
     show_help_children(avformat_get_class(), AV_OPT_FLAG_DECODING_PARAM);
+    return 0;
 }
 
 static void opt_pretty(void)
diff --git a/cmdutils.c b/cmdutils.c
index b017490f3f37bed3fae2f6d9d9b45011575d59c6..3b8ab3f44b51a891001792a68b4768eaf4b7e0d8 100644
--- a/cmdutils.c
+++ b/cmdutils.c
@@ -510,13 +510,16 @@ void show_banner(void)
     print_all_libs_info(INDENT|SHOW_VERSION, AV_LOG_VERBOSE);
 }
 
-void show_version(void) {
+int show_version(const char *opt, const char *arg)
+{
     av_log_set_callback(log_callback_help);
     printf("%s " LIBAV_VERSION "\n", program_name);
     print_all_libs_info(SHOW_VERSION, AV_LOG_INFO);
+
+    return 0;
 }
 
-void show_license(void)
+int show_license(const char *opt, const char *arg)
 {
     printf(
 #if CONFIG_NONFREE
@@ -583,9 +586,11 @@ void show_license(void)
     program_name, program_name, program_name
 #endif
     );
+
+    return 0;
 }
 
-void show_formats(void)
+int show_formats(const char *opt, const char *arg)
 {
     AVInputFormat *ifmt  = NULL;
     AVOutputFormat *ofmt = NULL;
@@ -630,6 +635,7 @@ void show_formats(void)
                name,
             long_name ? long_name:" ");
     }
+    return 0;
 }
 
 static char get_media_type_char(enum AVMediaType type)
@@ -665,7 +671,7 @@ static void print_codecs_for_id(enum AVCodecID id, int encoder)
     printf(")");
 }
 
-void show_codecs(void)
+int show_codecs(const char *opt, const char *arg)
 {
     const AVCodecDescriptor *desc = NULL;
 
@@ -706,6 +712,7 @@ void show_codecs(void)
 
         printf("\n");
     }
+    return 0;
 }
 
 static void print_codecs(int encoder)
@@ -751,7 +758,7 @@ int show_encoders(const char *opt, const char *arg)
     return 0;
 }
 
-void show_bsfs(void)
+int show_bsfs(const char *opt, const char *arg)
 {
     AVBitStreamFilter *bsf = NULL;
 
@@ -759,9 +766,10 @@ void show_bsfs(void)
     while ((bsf = av_bitstream_filter_next(bsf)))
         printf("%s\n", bsf->name);
     printf("\n");
+    return 0;
 }
 
-void show_protocols(void)
+int show_protocols(const char *opt, const char *arg)
 {
     void *opaque = NULL;
     const char *name;
@@ -773,9 +781,10 @@ void show_protocols(void)
     printf("Output:\n");
     while ((name = avio_enum_protocols(&opaque, 1)))
         printf("%s\n", name);
+    return 0;
 }
 
-void show_filters(void)
+int show_filters(const char *opt, const char *arg)
 {
     AVFilter av_unused(**filter) = NULL;
 
@@ -784,9 +793,10 @@ void show_filters(void)
     while ((filter = av_filter_next(filter)) && *filter)
         printf("%-16s %s\n", (*filter)->name, (*filter)->description);
 #endif
+    return 0;
 }
 
-void show_pix_fmts(void)
+int show_pix_fmts(const char *opt, const char *arg)
 {
     enum PixelFormat pix_fmt;
 
@@ -816,6 +826,7 @@ void show_pix_fmts(void)
                pix_desc->nb_components,
                av_get_bits_per_pixel(pix_desc));
     }
+    return 0;
 }
 
 int show_sample_fmts(const char *opt, const char *arg)
diff --git a/cmdutils.h b/cmdutils.h
index d787496a36248fd11cb23df961750d242229383b..a02d19d3beea7311b4b1854ab0ebabb43ef460cb 100644
--- a/cmdutils.h
+++ b/cmdutils.h
@@ -258,25 +258,25 @@ void show_banner(void);
  * depends on the current versions of the repository and of the libav*
  * libraries.
  */
-void show_version(void);
+int show_version(const char *opt, const char *arg);
 
 /**
  * Print the license of the program to stdout. The license depends on
  * the license of the libraries compiled into the program.
  */
-void show_license(void);
+int show_license(const char *opt, const char *arg);
 
 /**
  * Print a listing containing all the formats supported by the
  * program.
  */
-void show_formats(void);
+int show_formats(const char *opt, const char *arg);
 
 /**
  * Print a listing containing all the codecs supported by the
  * program.
  */
-void show_codecs(void);
+int show_codecs(const char *opt, const char *arg);
 
 /**
  * Print a listing containing all the decoders supported by the
@@ -294,25 +294,25 @@ int show_encoders(const char *opt, const char *arg);
  * Print a listing containing all the filters supported by the
  * program.
  */
-void show_filters(void);
+int show_filters(const char *opt, const char *arg);
 
 /**
  * Print a listing containing all the bit stream filters supported by the
  * program.
  */
-void show_bsfs(void);
+int show_bsfs(const char *opt, const char *arg);
 
 /**
  * Print a listing containing all the protocols supported by the
  * program.
  */
-void show_protocols(void);
+int show_protocols(const char *opt, const char *arg);
 
 /**
  * Print a listing containing all the pixel formats supported by the
  * program.
  */
-void show_pix_fmts(void);
+int show_pix_fmts(const char *opt, const char *arg);
 
 /**
  * Print a listing containing all the sample formats supported by the
diff --git a/cmdutils_common_opts.h b/cmdutils_common_opts.h
index d9a09c0c193a5604be6f476bb84a1efbd5d04d13..d66a82ecbceb7f90ac711f685a74c0f92d70c6c6 100644
--- a/cmdutils_common_opts.h
+++ b/cmdutils_common_opts.h
@@ -1,17 +1,17 @@
-    { "L", OPT_EXIT, {(void*)show_license}, "show license" },
-    { "h", OPT_EXIT, {(void*)show_help}, "show help" },
-    { "?", OPT_EXIT, {(void*)show_help}, "show help" },
-    { "help", OPT_EXIT, {(void*)show_help}, "show help" },
-    { "-help", OPT_EXIT, {(void*)show_help}, "show help" },
-    { "version", OPT_EXIT, {(void*)show_version}, "show version" },
-    { "formats"  , OPT_EXIT, {(void*)show_formats  }, "show available formats" },
-    { "codecs"   , OPT_EXIT, {(void*)show_codecs   }, "show available codecs" },
-    { "decoders" , OPT_EXIT, {(void*)show_decoders }, "show available decoders" },
-    { "encoders" , OPT_EXIT, {(void*)show_encoders }, "show available encoders" },
-    { "bsfs"     , OPT_EXIT, {(void*)show_bsfs     }, "show available bit stream filters" },
-    { "protocols", OPT_EXIT, {(void*)show_protocols}, "show available protocols" },
-    { "filters",   OPT_EXIT, {(void*)show_filters  }, "show available filters" },
-    { "pix_fmts" , OPT_EXIT, {(void*)show_pix_fmts }, "show available pixel formats" },
+    { "L"          , OPT_EXIT, {.func_arg = show_license},      "show license" },
+    { "h"          , OPT_EXIT, {.func_arg = show_help},         "show help" },
+    { "?"          , OPT_EXIT, {.func_arg = show_help},         "show help" },
+    { "help"       , OPT_EXIT, {.func_arg = show_help},         "show help" },
+    { "-help"      , OPT_EXIT, {.func_arg = show_help},         "show help" },
+    { "version"    , OPT_EXIT, {.func_arg = show_version},      "show version" },
+    { "formats"    , OPT_EXIT, {.func_arg = show_formats  },    "show available formats" },
+    { "codecs"     , OPT_EXIT, {.func_arg = show_codecs   },    "show available codecs" },
+    { "decoders"   , OPT_EXIT, {.func_arg = show_decoders },    "show available decoders" },
+    { "encoders"   , OPT_EXIT, {.func_arg = show_encoders },    "show available encoders" },
+    { "bsfs"       , OPT_EXIT, {.func_arg = show_bsfs     },    "show available bit stream filters" },
+    { "protocols"  , OPT_EXIT, {.func_arg = show_protocols},    "show available protocols" },
+    { "filters"    , OPT_EXIT, {.func_arg = show_filters  },    "show available filters" },
+    { "pix_fmts"   , OPT_EXIT, {.func_arg = show_pix_fmts },    "show available pixel formats" },
     { "sample_fmts", OPT_EXIT, {.func_arg = show_sample_fmts }, "show available audio sample formats" },
-    { "loglevel", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
-    { "v", HAS_ARG, {(void*)opt_loglevel}, "set libav* logging level", "loglevel" },
+    { "loglevel"   , HAS_ARG,  {.func_arg = opt_loglevel},      "set libav* logging level", "loglevel" },
+    { "v",           HAS_ARG,  {.func_arg = opt_loglevel},      "set libav* logging level", "loglevel" },