mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-08-02 07:23:41 +02:00
Use G_OPTION_ENTRY_NULL to avoid missing initializer warnings
This commit is contained in:
committed by
Philip Withnall
parent
53834ee319
commit
e952248dc2
@@ -7,7 +7,7 @@ int port = 7777;
|
||||
static GOptionEntry cmd_entries[] = {
|
||||
{"port", 'p', 0, G_OPTION_ARG_INT, &port,
|
||||
"Local port to bind to", NULL},
|
||||
{NULL}
|
||||
G_OPTION_ENTRY_NULL
|
||||
};
|
||||
|
||||
|
||||
|
@@ -54,7 +54,7 @@ static GOptionEntry entries[] = {
|
||||
{"to-charset", 0, 0, G_OPTION_ARG_STRING, &to_charset, "to charset", NULL},
|
||||
{"fallback", 0, 0, G_OPTION_ARG_NONE, &fallback, "use fallback", NULL},
|
||||
{G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &locations, "locations", NULL},
|
||||
{NULL}
|
||||
G_OPTION_ENTRY_NULL
|
||||
};
|
||||
|
||||
static void
|
||||
|
@@ -17,7 +17,7 @@ my_cmdline_handler (gpointer data)
|
||||
{ "arg1", 0, 0, G_OPTION_ARG_INT, &arg1, NULL, NULL },
|
||||
{ "arg2", 0, 0, G_OPTION_ARG_NONE, &arg2, NULL, NULL },
|
||||
{ "help", '?', 0, G_OPTION_ARG_NONE, &help, NULL, NULL },
|
||||
{ NULL }
|
||||
G_OPTION_ENTRY_NULL
|
||||
};
|
||||
GError *error;
|
||||
gint i;
|
||||
|
@@ -53,7 +53,7 @@ main (int argc, char **argv)
|
||||
/* A dummy flag option, to be handled in primary */
|
||||
{ "flag", 'f', G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, NULL, "A flag argument", NULL },
|
||||
|
||||
{ NULL }
|
||||
G_OPTION_ENTRY_NULL
|
||||
};
|
||||
|
||||
app = g_application_new ("org.gtk.TestApplication",
|
||||
|
@@ -19,7 +19,7 @@ main (int argc, char *argv[])
|
||||
{ "config-file", 0, 0, G_OPTION_ARG_STRING, &config_file, N_("Ignored, for compat with GTestDbus"), NULL },
|
||||
{ "print-address", 0, 0, G_OPTION_ARG_NONE, &print_address, N_("Print address"), NULL },
|
||||
{ "print-env", 0, 0, G_OPTION_ARG_NONE, &print_env, N_("Print address in shell mode"), NULL },
|
||||
{ NULL }
|
||||
G_OPTION_ENTRY_NULL
|
||||
};
|
||||
|
||||
context = g_option_context_new ("");
|
||||
|
@@ -40,7 +40,7 @@ main (int argc, char *argv[])
|
||||
{ "replace", 'r', 0, G_OPTION_ARG_NONE, &opt_replace, "Replace existing name if possible", NULL },
|
||||
{ "allow-replacement", 'a', 0, G_OPTION_ARG_NONE, &opt_allow_replacement, "Allow replacement", NULL },
|
||||
{ "name", 'n', 0, G_OPTION_ARG_STRING, &opt_name, "Name to acquire", NULL },
|
||||
{ NULL}
|
||||
G_OPTION_ENTRY_NULL
|
||||
};
|
||||
|
||||
error = NULL;
|
||||
|
@@ -252,7 +252,7 @@ main (int argc, char *argv[])
|
||||
{ "server", 's', 0, G_OPTION_ARG_NONE, &opt_server, "Start a server instead of a client", NULL },
|
||||
{ "address", 'a', 0, G_OPTION_ARG_STRING, &opt_address, "D-Bus address to use", NULL },
|
||||
{ "allow-anonymous", 'n', 0, G_OPTION_ARG_NONE, &opt_allow_anonymous, "Allow anonymous authentication", NULL },
|
||||
{ NULL}
|
||||
G_OPTION_ENTRY_NULL
|
||||
};
|
||||
|
||||
ret = 1;
|
||||
|
@@ -9,7 +9,7 @@ static GOptionEntry opt_entries[] =
|
||||
{ "name", 'n', 0, G_OPTION_ARG_STRING, &opt_name, "Name to watch", NULL },
|
||||
{ "system-bus", 's', 0, G_OPTION_ARG_NONE, &opt_system_bus, "Use the system-bus instead of the session-bus", NULL },
|
||||
{ "auto-start", 'a', 0, G_OPTION_ARG_NONE, &opt_auto_start, "Instruct the bus to launch an owner for the name", NULL},
|
||||
{ NULL}
|
||||
G_OPTION_ENTRY_NULL
|
||||
};
|
||||
|
||||
static void
|
||||
|
@@ -15,7 +15,7 @@ static GOptionEntry opt_entries[] =
|
||||
{ "system-bus", 's', 0, G_OPTION_ARG_NONE, &opt_system_bus, "Use the system-bus instead of the session-bus", NULL },
|
||||
{ "no-auto-start", 'a', 0, G_OPTION_ARG_NONE, &opt_no_auto_start, "Don't instruct the bus to launch an owner for the name", NULL},
|
||||
{ "no-properties", 'p', 0, G_OPTION_ARG_NONE, &opt_no_properties, "Do not load properties", NULL},
|
||||
{ NULL}
|
||||
G_OPTION_ENTRY_NULL
|
||||
};
|
||||
|
||||
static GMainLoop *loop = NULL;
|
||||
|
@@ -12,7 +12,7 @@
|
||||
#endif
|
||||
|
||||
static GOptionEntry options[] = {
|
||||
{NULL}
|
||||
G_OPTION_ENTRY_NULL
|
||||
};
|
||||
|
||||
static void
|
||||
|
@@ -6,7 +6,7 @@ static char *root = NULL;
|
||||
static GOptionEntry cmd_entries[] = {
|
||||
{"port", 'p', 0, G_OPTION_ARG_INT, &port,
|
||||
"Local port to bind to", NULL},
|
||||
{NULL}
|
||||
G_OPTION_ENTRY_NULL
|
||||
};
|
||||
|
||||
static void
|
||||
|
@@ -1371,7 +1371,7 @@ main (int argc, char *argv[])
|
||||
{"verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "Be verbose", NULL},
|
||||
{"posix", 'x', 0, G_OPTION_ARG_NONE, &posix_compat,
|
||||
"Test POSIX-specific features (unix permissions, symlinks)", NULL},
|
||||
{NULL}
|
||||
G_OPTION_ENTRY_NULL
|
||||
};
|
||||
|
||||
test_suite = FALSE;
|
||||
|
@@ -672,7 +672,7 @@ static const GOptionEntry option_entries[] = {
|
||||
{ "synchronous", 's', 0, G_OPTION_ARG_NONE, &synchronous, "Synchronous connections", NULL },
|
||||
{ "connectable", 'c', 0, G_OPTION_ARG_INT, &connectable_count, "Connectable count", "C" },
|
||||
{ "special-type", 't', 0, G_OPTION_ARG_CALLBACK, record_type_arg, "Record type like MX, TXT, NS or SOA", "RR" },
|
||||
{ NULL },
|
||||
G_OPTION_ENTRY_NULL,
|
||||
};
|
||||
|
||||
int
|
||||
|
@@ -20,7 +20,7 @@ static GOptionEntry cmd_entries[] = {
|
||||
"Time out socket I/O after the specified number of seconds", NULL},
|
||||
{"verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
|
||||
"Verbose debugging output", NULL},
|
||||
{NULL}
|
||||
G_OPTION_ENTRY_NULL
|
||||
};
|
||||
|
||||
static gpointer
|
||||
|
Reference in New Issue
Block a user