[FFmpeg-devel] [PATCH 2/2] fftools/ffprobe: Remove unneeded casts

Andreas Rheinhardt andreas.rheinhardt at gmail.com
Fri Feb 14 12:35:17 EET 2020


On Tue, Aug 6, 2019 at 3:18 AM Andreas Rheinhardt <
andreas.rheinhardt at gmail.com> wrote:

> Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt at gmail.com>
> ---
>  fftools/ffprobe.c | 20 ++++++++++----------
>  1 file changed, 10 insertions(+), 10 deletions(-)
>
> diff --git a/fftools/ffprobe.c b/fftools/ffprobe.c
> index 2380417229..9d55810cf9 100644
> --- a/fftools/ffprobe.c
> +++ b/fftools/ffprobe.c
> @@ -3507,13 +3507,13 @@ static const OptionDef real_options[] = {
>        "use sexagesimal format HOURS:MM:SS.MICROSECONDS for time units" },
>      { "pretty", 0, {.func_arg = opt_pretty},
>        "prettify the format of displayed values, make it more human
> readable" },
> -    { "print_format", OPT_STRING | HAS_ARG, {(void*)&print_format},
> +    { "print_format", OPT_STRING | HAS_ARG, { &print_format },
>        "set the output printing format (available formats are: default,
> compact, csv, flat, ini, json, xml)", "format" },
> -    { "of", OPT_STRING | HAS_ARG, {(void*)&print_format}, "alias for
> -print_format", "format" },
> -    { "select_streams", OPT_STRING | HAS_ARG, {(void*)&stream_specifier},
> "select the specified streams", "stream_specifier" },
> +    { "of", OPT_STRING | HAS_ARG, { &print_format }, "alias for
> -print_format", "format" },
> +    { "select_streams", OPT_STRING | HAS_ARG, { &stream_specifier },
> "select the specified streams", "stream_specifier" },
>      { "sections", OPT_EXIT, {.func_arg = opt_sections}, "print sections
> structure and section information, and exit" },
> -    { "show_data",    OPT_BOOL, {(void*)&do_show_data}, "show packets
> data" },
> -    { "show_data_hash", OPT_STRING | HAS_ARG, {(void*)&show_data_hash},
> "show packets data hash" },
> +    { "show_data",    OPT_BOOL, { &do_show_data }, "show packets data" },
> +    { "show_data_hash", OPT_STRING | HAS_ARG, { &show_data_hash }, "show
> packets data hash" },
>      { "show_error",   0, { .func_arg = &opt_show_error },  "show probing
> error" },
>      { "show_format",  0, { .func_arg = &opt_show_format }, "show
> format/container info" },
>      { "show_frames",  0, { .func_arg = &opt_show_frames }, "show frames
> info" },
> @@ -3522,20 +3522,20 @@ static const OptionDef real_options[] = {
>      { "show_entries", HAS_ARG, {.func_arg = opt_show_entries},
>        "show a set of specified entries", "entry_list" },
>  #if HAVE_THREADS
> -    { "show_log", OPT_INT|HAS_ARG, {(void*)&do_show_log}, "show log" },
> +    { "show_log", OPT_INT|HAS_ARG, { &do_show_log }, "show log" },
>  #endif
>      { "show_packets", 0, { .func_arg = &opt_show_packets }, "show packets
> info" },
>      { "show_programs", 0, { .func_arg = &opt_show_programs }, "show
> programs info" },
>      { "show_streams", 0, { .func_arg = &opt_show_streams }, "show streams
> info" },
>      { "show_chapters", 0, { .func_arg = &opt_show_chapters }, "show
> chapters info" },
> -    { "count_frames", OPT_BOOL, {(void*)&do_count_frames}, "count the
> number of frames per stream" },
> -    { "count_packets", OPT_BOOL, {(void*)&do_count_packets}, "count the
> number of packets per stream" },
> +    { "count_frames", OPT_BOOL, { &do_count_frames }, "count the number
> of frames per stream" },
> +    { "count_packets", OPT_BOOL, { &do_count_packets }, "count the number
> of packets per stream" },
>      { "show_program_version",  0, { .func_arg = &opt_show_program_version
> },  "show ffprobe version" },
>      { "show_library_versions", 0, { .func_arg =
> &opt_show_library_versions }, "show library versions" },
>      { "show_versions",         0, { .func_arg = &opt_show_versions },
> "show program and library versions" },
>      { "show_pixel_formats", 0, { .func_arg = &opt_show_pixel_formats },
> "show pixel format descriptions" },
> -    { "show_private_data", OPT_BOOL, {(void*)&show_private_data}, "show
> private data" },
> -    { "private",           OPT_BOOL, {(void*)&show_private_data}, "same
> as show_private_data" },
> +    { "show_private_data", OPT_BOOL, { &show_private_data }, "show
> private data" },
> +    { "private",           OPT_BOOL, { &show_private_data }, "same as
> show_private_data" },
>      { "bitexact", OPT_BOOL, {&do_bitexact}, "force bitexact output" },
>      { "read_intervals", HAS_ARG, {.func_arg = opt_read_intervals}, "set
> read intervals", "read_intervals" },
>      { "default", HAS_ARG | OPT_AUDIO | OPT_VIDEO | OPT_EXPERT, {.func_arg
> = opt_default}, "generic catch all option", "" },
> --
>

Ping.

- Andreas


More information about the ffmpeg-devel mailing list