1
0
mirror of https://github.com/mpv-player/mpv synced 2025-01-14 11:01:35 +00:00

Remove obsolete extra elements from opt_t struct initialization.

Fixes a bunch of 'excess elements in struct initializer' warnings.


git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@28957 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
diego 2009-03-15 10:03:09 +00:00
parent 17d0933e57
commit 8484309af2
8 changed files with 37 additions and 37 deletions

View File

@ -579,9 +579,9 @@ static int parse_suboptions(const char *arg) {
*helpmsg = NULL;
int pseudoargc, displayhelp = 0, *booleans;
const opt_t extra_opts[] = {
{"osdcolor", OPT_ARG_MSTRZ, &osdcolor, NULL, 0},
{"subcolor", OPT_ARG_MSTRZ, &subcolor, NULL, 0},
{"help", OPT_ARG_BOOL, &displayhelp, NULL, 0} };
{"osdcolor", OPT_ARG_MSTRZ, &osdcolor, NULL},
{"subcolor", OPT_ARG_MSTRZ, &subcolor, NULL},
{"help", OPT_ARG_BOOL, &displayhelp, NULL} };
opt_t *subopts = NULL, *p;
char * const strings_list[] = {"-driver", "-kbddriver", "-mousedriver", "-font",
"-width", "-height", "-minwidth", "-minheight", "-maxwidth",

View File

@ -105,9 +105,9 @@ static char *gif_filename = NULL;
#define DEFAULT_FILE "out.gif"
static const opt_t subopts[] = {
{"output", OPT_ARG_MSTRZ, &gif_filename, NULL, 0},
{"fps", OPT_ARG_FLOAT, &target_fps, NULL, 0},
{NULL, 0, NULL, NULL, 0}
{"output", OPT_ARG_MSTRZ, &gif_filename, NULL},
{"fps", OPT_ARG_FLOAT, &target_fps, NULL},
{NULL, 0, NULL, NULL}
};
static int preinit(const char *arg)

View File

@ -340,19 +340,19 @@ static int int_zero_hundred(int *val)
static int preinit(const char *arg)
{
const opt_t subopts[] = {
{"progressive", OPT_ARG_BOOL, &jpeg_progressive_mode, NULL, 0},
{"baseline", OPT_ARG_BOOL, &jpeg_baseline, NULL, 0},
{"progressive", OPT_ARG_BOOL, &jpeg_progressive_mode, NULL},
{"baseline", OPT_ARG_BOOL, &jpeg_baseline, NULL},
{"optimize", OPT_ARG_INT, &jpeg_optimize,
(opt_test_f)int_zero_hundred, 0},
(opt_test_f)int_zero_hundred},
{"smooth", OPT_ARG_INT, &jpeg_smooth,
(opt_test_f)int_zero_hundred, 0},
(opt_test_f)int_zero_hundred},
{"quality", OPT_ARG_INT, &jpeg_quality,
(opt_test_f)int_zero_hundred, 0},
{"dpi", OPT_ARG_INT, &jpeg_dpi, NULL, 0},
{"outdir", OPT_ARG_MSTRZ, &jpeg_outdir, NULL, 0},
{"subdirs", OPT_ARG_MSTRZ, &jpeg_subdirs, NULL, 0},
{"maxfiles", OPT_ARG_INT, &jpeg_maxfiles, (opt_test_f)int_pos, 0},
{NULL, 0, NULL, NULL, 0}
(opt_test_f)int_zero_hundred},
{"dpi", OPT_ARG_INT, &jpeg_dpi, NULL},
{"outdir", OPT_ARG_MSTRZ, &jpeg_outdir, NULL},
{"subdirs", OPT_ARG_MSTRZ, &jpeg_subdirs, NULL},
{"maxfiles", OPT_ARG_INT, &jpeg_maxfiles, (opt_test_f)int_pos},
{NULL, 0, NULL, NULL}
};
const char *info_message = NULL;

View File

@ -108,8 +108,8 @@ static void md5sum_write_error(void) {
static int preinit(const char *arg)
{
const opt_t subopts[] = {
{"outfile", OPT_ARG_MSTRZ, &md5sum_outfile, NULL, 0},
{NULL, 0, NULL, NULL, 0}
{"outfile", OPT_ARG_MSTRZ, &md5sum_outfile, NULL},
{NULL, 0, NULL, NULL}
};
mp_msg(MSGT_VO, MSGL_INFO, "%s: %s\n", info.short_name,

View File

@ -291,9 +291,9 @@ static int int_zero_to_nine(int *sh)
}
static const opt_t subopts[] = {
{"alpha", OPT_ARG_BOOL, &use_alpha, NULL, 0},
{"alpha", OPT_ARG_BOOL, &use_alpha, NULL},
{"z", OPT_ARG_INT, &z_compression, (opt_test_f)int_zero_to_nine},
{"outdir", OPT_ARG_MSTRZ, &png_outdir, NULL, 0},
{"outdir", OPT_ARG_MSTRZ, &png_outdir, NULL},
{NULL}
};

View File

@ -121,15 +121,15 @@ static int preinit(const char *arg)
int ppm_type = 0, pgm_type = 0, pgmyuv_type = 0,
raw_mode = 0, ascii_mode = 0;
const opt_t subopts[] = {
{"ppm", OPT_ARG_BOOL, &ppm_type, NULL, 0},
{"pgm", OPT_ARG_BOOL, &pgm_type, NULL, 0},
{"pgmyuv", OPT_ARG_BOOL, &pgmyuv_type, NULL, 0},
{"raw", OPT_ARG_BOOL, &raw_mode, NULL, 0},
{"ascii", OPT_ARG_BOOL, &ascii_mode, NULL, 0},
{"outdir", OPT_ARG_MSTRZ, &pnm_outdir, NULL, 0},
{"subdirs", OPT_ARG_MSTRZ, &pnm_subdirs, NULL, 0},
{"maxfiles", OPT_ARG_INT, &pnm_maxfiles, (opt_test_f)int_pos, 0},
{NULL, 0, NULL, NULL, 0}
{"ppm", OPT_ARG_BOOL, &ppm_type, NULL},
{"pgm", OPT_ARG_BOOL, &pgm_type, NULL},
{"pgmyuv", OPT_ARG_BOOL, &pgmyuv_type, NULL},
{"raw", OPT_ARG_BOOL, &raw_mode, NULL},
{"ascii", OPT_ARG_BOOL, &ascii_mode, NULL},
{"outdir", OPT_ARG_MSTRZ, &pnm_outdir, NULL},
{"subdirs", OPT_ARG_MSTRZ, &pnm_subdirs, NULL},
{"maxfiles", OPT_ARG_INT, &pnm_maxfiles, (opt_test_f)int_pos},
{NULL, 0, NULL, NULL}
};
const char *info_message = NULL;

View File

@ -1527,10 +1527,10 @@ static int preinit(const char *arg)
int sdl_hwaccel;
int sdl_forcexv;
const opt_t subopts[] = {
{"forcexv", OPT_ARG_BOOL, &sdl_forcexv, NULL, 0},
{"hwaccel", OPT_ARG_BOOL, &sdl_hwaccel, NULL, 0},
{"driver", OPT_ARG_MSTRZ, &sdl_driver, NULL, 0},
{NULL, 0, NULL, NULL, 0}
{"forcexv", OPT_ARG_BOOL, &sdl_forcexv, NULL},
{"hwaccel", OPT_ARG_BOOL, &sdl_hwaccel, NULL},
{"driver", OPT_ARG_MSTRZ, &sdl_driver, NULL},
{NULL, 0, NULL, NULL}
};
sdl_forcexv = 1;

View File

@ -210,10 +210,10 @@ static int preinit(const char *arg) {
char *dev_arg = NULL, *norm_arg = NULL;
int norm = VIDEO_MODE_AUTO, prebuf = 0;
const opt_t subopts[] = { /* don't want warnings with -Wall... */
{ "dev", OPT_ARG_MSTRZ, &dev_arg, NULL, 0 },
{ "prebuf", OPT_ARG_BOOL, &prebuf, (opt_test_f)pbc, 0 },
{ "norm", OPT_ARG_MSTRZ, &norm_arg, (opt_test_f)nc, 0 },
{ NULL, 0, NULL, NULL, 0 }
{ "dev", OPT_ARG_MSTRZ, &dev_arg, NULL },
{ "prebuf", OPT_ARG_BOOL, &prebuf, (opt_test_f)pbc },
{ "norm", OPT_ARG_MSTRZ, &norm_arg, (opt_test_f)nc },
{ NULL, 0, NULL, NULL }
};
VERBOSE("preinit() called with arg: %s\n", arg);