mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-02-27 04:32:15 +01:00
Merge branch 'fix_more_warnings' into 'master'
Fix more warnings See merge request GNOME/glib!2101
This commit is contained in:
commit
3bca6ee2e4
@ -543,7 +543,7 @@ g_application_parse_command_line (GApplication *application,
|
|||||||
GOptionEntry entries[] = {
|
GOptionEntry entries[] = {
|
||||||
{ "gapplication-service", '\0', 0, G_OPTION_ARG_NONE, &become_service,
|
{ "gapplication-service", '\0', 0, G_OPTION_ARG_NONE, &become_service,
|
||||||
N_("Enter GApplication service mode (use from D-Bus service files)"), NULL },
|
N_("Enter GApplication service mode (use from D-Bus service files)"), NULL },
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
g_option_group_add_entries (gapplication_group, entries);
|
g_option_group_add_entries (gapplication_group, entries);
|
||||||
@ -555,7 +555,7 @@ g_application_parse_command_line (GApplication *application,
|
|||||||
GOptionEntry entries[] = {
|
GOptionEntry entries[] = {
|
||||||
{ "gapplication-app-id", '\0', 0, G_OPTION_ARG_STRING, &app_id,
|
{ "gapplication-app-id", '\0', 0, G_OPTION_ARG_STRING, &app_id,
|
||||||
N_("Override the application’s ID"), NULL },
|
N_("Override the application’s ID"), NULL },
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
g_option_group_add_entries (gapplication_group, entries);
|
g_option_group_add_entries (gapplication_group, entries);
|
||||||
@ -567,7 +567,7 @@ g_application_parse_command_line (GApplication *application,
|
|||||||
GOptionEntry entries[] = {
|
GOptionEntry entries[] = {
|
||||||
{ "gapplication-replace", '\0', 0, G_OPTION_ARG_NONE, &replace,
|
{ "gapplication-replace", '\0', 0, G_OPTION_ARG_NONE, &replace,
|
||||||
N_("Replace the running instance"), NULL },
|
N_("Replace the running instance"), NULL },
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
g_option_group_add_entries (gapplication_group, entries);
|
g_option_group_add_entries (gapplication_group, entries);
|
||||||
@ -729,7 +729,11 @@ g_application_add_main_option_entries (GApplication *application,
|
|||||||
|
|
||||||
for (i = 0; entries[i].long_name; i++)
|
for (i = 0; entries[i].long_name; i++)
|
||||||
{
|
{
|
||||||
GOptionEntry my_entries[2] = { { NULL }, { NULL } };
|
GOptionEntry my_entries[2] =
|
||||||
|
{
|
||||||
|
G_OPTION_ENTRY_NULL,
|
||||||
|
G_OPTION_ENTRY_NULL
|
||||||
|
};
|
||||||
my_entries[0] = entries[i];
|
my_entries[0] = entries[i];
|
||||||
|
|
||||||
if (!my_entries[0].arg_data)
|
if (!my_entries[0].arg_data)
|
||||||
@ -778,7 +782,7 @@ g_application_add_main_option (GApplication *application,
|
|||||||
gchar *dup_string;
|
gchar *dup_string;
|
||||||
GOptionEntry my_entry[2] = {
|
GOptionEntry my_entry[2] = {
|
||||||
{ NULL, short_name, flags, arg, NULL, NULL, NULL },
|
{ NULL, short_name, flags, arg, NULL, NULL, NULL },
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
g_return_if_fail (G_IS_APPLICATION (application));
|
g_return_if_fail (G_IS_APPLICATION (application));
|
||||||
|
@ -403,7 +403,7 @@ static const GOptionEntry connection_entries[] =
|
|||||||
{ "system", 'y', 0, G_OPTION_ARG_NONE, &opt_connection_system, N_("Connect to the system bus"), NULL},
|
{ "system", 'y', 0, G_OPTION_ARG_NONE, &opt_connection_system, N_("Connect to the system bus"), NULL},
|
||||||
{ "session", 'e', 0, G_OPTION_ARG_NONE, &opt_connection_session, N_("Connect to the session bus"), NULL},
|
{ "session", 'e', 0, G_OPTION_ARG_NONE, &opt_connection_session, N_("Connect to the session bus"), NULL},
|
||||||
{ "address", 'a', 0, G_OPTION_ARG_STRING, &opt_connection_address, N_("Connect to given D-Bus address"), NULL},
|
{ "address", 'a', 0, G_OPTION_ARG_STRING, &opt_connection_address, N_("Connect to given D-Bus address"), NULL},
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static GOptionGroup *
|
static GOptionGroup *
|
||||||
@ -593,7 +593,7 @@ static const GOptionEntry emit_entries[] =
|
|||||||
{ "dest", 'd', 0, G_OPTION_ARG_STRING, &opt_emit_dest, N_("Optional destination for signal (unique name)"), NULL},
|
{ "dest", 'd', 0, G_OPTION_ARG_STRING, &opt_emit_dest, N_("Optional destination for signal (unique name)"), NULL},
|
||||||
{ "object-path", 'o', 0, G_OPTION_ARG_STRING, &opt_emit_object_path, N_("Object path to emit signal on"), NULL},
|
{ "object-path", 'o', 0, G_OPTION_ARG_STRING, &opt_emit_object_path, N_("Object path to emit signal on"), NULL},
|
||||||
{ "signal", 's', 0, G_OPTION_ARG_STRING, &opt_emit_signal, N_("Signal and interface name"), NULL},
|
{ "signal", 's', 0, G_OPTION_ARG_STRING, &opt_emit_signal, N_("Signal and interface name"), NULL},
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -894,7 +894,7 @@ static const GOptionEntry call_entries[] =
|
|||||||
{ "object-path", 'o', 0, G_OPTION_ARG_STRING, &opt_call_object_path, N_("Object path to invoke method on"), NULL},
|
{ "object-path", 'o', 0, G_OPTION_ARG_STRING, &opt_call_object_path, N_("Object path to invoke method on"), NULL},
|
||||||
{ "method", 'm', 0, G_OPTION_ARG_STRING, &opt_call_method, N_("Method and interface name"), NULL},
|
{ "method", 'm', 0, G_OPTION_ARG_STRING, &opt_call_method, N_("Method and interface name"), NULL},
|
||||||
{ "timeout", 't', 0, G_OPTION_ARG_INT, &opt_call_timeout, N_("Timeout in seconds"), NULL},
|
{ "timeout", 't', 0, G_OPTION_ARG_INT, &opt_call_timeout, N_("Timeout in seconds"), NULL},
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -1688,7 +1688,7 @@ static const GOptionEntry introspect_entries[] =
|
|||||||
{ "xml", 'x', 0, G_OPTION_ARG_NONE, &opt_introspect_xml, N_("Print XML"), NULL},
|
{ "xml", 'x', 0, G_OPTION_ARG_NONE, &opt_introspect_xml, N_("Print XML"), NULL},
|
||||||
{ "recurse", 'r', 0, G_OPTION_ARG_NONE, &opt_introspect_recurse, N_("Introspect children"), NULL},
|
{ "recurse", 'r', 0, G_OPTION_ARG_NONE, &opt_introspect_recurse, N_("Introspect children"), NULL},
|
||||||
{ "only-properties", 'p', 0, G_OPTION_ARG_NONE, &opt_introspect_only_properties, N_("Only print properties"), NULL},
|
{ "only-properties", 'p', 0, G_OPTION_ARG_NONE, &opt_introspect_only_properties, N_("Only print properties"), NULL},
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -1984,7 +1984,7 @@ static const GOptionEntry monitor_entries[] =
|
|||||||
{
|
{
|
||||||
{ "dest", 'd', 0, G_OPTION_ARG_STRING, &opt_monitor_dest, N_("Destination name to monitor"), NULL},
|
{ "dest", 'd', 0, G_OPTION_ARG_STRING, &opt_monitor_dest, N_("Destination name to monitor"), NULL},
|
||||||
{ "object-path", 'o', 0, G_OPTION_ARG_STRING, &opt_monitor_object_path, N_("Object path to monitor"), NULL},
|
{ "object-path", 'o', 0, G_OPTION_ARG_STRING, &opt_monitor_object_path, N_("Object path to monitor"), NULL},
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static gboolean
|
static gboolean
|
||||||
@ -2195,7 +2195,7 @@ static const GOptionEntry wait_entries[] =
|
|||||||
{ "timeout", 't', 0, G_OPTION_ARG_INT64, &opt_wait_timeout_secs,
|
{ "timeout", 't', 0, G_OPTION_ARG_INT64, &opt_wait_timeout_secs,
|
||||||
N_("Timeout to wait for before exiting with an error (seconds); 0 for "
|
N_("Timeout to wait for before exiting with an error (seconds); 0 for "
|
||||||
"no timeout (default)"), "SECS" },
|
"no timeout (default)"), "SECS" },
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include "gio-tool.h"
|
#include "gio-tool.h"
|
||||||
|
|
||||||
static const GOptionEntry entries[] = {
|
static const GOptionEntry entries[] = {
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -39,7 +39,7 @@ static const GOptionEntry entries[] = {
|
|||||||
{ "nofollow-symlinks", 'n', 0, G_OPTION_ARG_NONE, &nofollow_symlinks, N_("Don’t follow symbolic links"), NULL},
|
{ "nofollow-symlinks", 'n', 0, G_OPTION_ARG_NONE, &nofollow_symlinks, N_("Don’t follow symbolic links"), NULL},
|
||||||
{ "print-display-names", 'd', 0, G_OPTION_ARG_NONE, &print_display_names, N_("Print display names"), NULL },
|
{ "print-display-names", 'd', 0, G_OPTION_ARG_NONE, &print_display_names, N_("Print display names"), NULL },
|
||||||
{ "print-uris", 'u', 0, G_OPTION_ARG_NONE, &print_uris, N_("Print full URIs"), NULL},
|
{ "print-uris", 'u', 0, G_OPTION_ARG_NONE, &print_uris, N_("Print full URIs"), NULL},
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
#include "gio-tool.h"
|
#include "gio-tool.h"
|
||||||
|
|
||||||
static const GOptionEntry entries[] = {
|
static const GOptionEntry entries[] = {
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static GAppInfo *
|
static GAppInfo *
|
||||||
|
@ -29,7 +29,7 @@ static gboolean parent = FALSE;
|
|||||||
|
|
||||||
static const GOptionEntry entries[] = {
|
static const GOptionEntry entries[] = {
|
||||||
{ "parent", 'p', 0, G_OPTION_ARG_NONE, &parent, N_("Create parent directories"), NULL },
|
{ "parent", 'p', 0, G_OPTION_ARG_NONE, &parent, N_("Create parent directories"), NULL },
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -47,7 +47,7 @@ static const GOptionEntry entries[] = {
|
|||||||
N_("Watch for mount events"), NULL },
|
N_("Watch for mount events"), NULL },
|
||||||
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &watch_default,
|
{ G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &watch_default,
|
||||||
NULL, NULL },
|
NULL, NULL },
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -75,7 +75,7 @@ static const GOptionEntry entries[] =
|
|||||||
{ "tcrypt-pim", 0, 0, G_OPTION_ARG_INT, &tcrypt_pim, N_("The numeric PIM when unlocking a VeraCrypt volume"), N_("PIM")},
|
{ "tcrypt-pim", 0, 0, G_OPTION_ARG_INT, &tcrypt_pim, N_("The numeric PIM when unlocking a VeraCrypt volume"), N_("PIM")},
|
||||||
{ "tcrypt-hidden", 0, 0, G_OPTION_ARG_NONE, &tcrypt_hidden, N_("Mount a TCRYPT hidden volume"), NULL},
|
{ "tcrypt-hidden", 0, 0, G_OPTION_ARG_NONE, &tcrypt_hidden, N_("Mount a TCRYPT hidden volume"), NULL},
|
||||||
{ "tcrypt-system", 0, 0, G_OPTION_ARG_NONE, &tcrypt_system, N_("Mount a TCRYPT system volume"), NULL},
|
{ "tcrypt-system", 0, 0, G_OPTION_ARG_NONE, &tcrypt_system, N_("Mount a TCRYPT system volume"), NULL},
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
|
@ -40,7 +40,7 @@ static const GOptionEntry entries[] = {
|
|||||||
{ "interactive", 'i', 0, G_OPTION_ARG_NONE, &interactive, N_("Prompt before overwrite"), NULL },
|
{ "interactive", 'i', 0, G_OPTION_ARG_NONE, &interactive, N_("Prompt before overwrite"), NULL },
|
||||||
{ "backup", 'b', 0, G_OPTION_ARG_NONE, &backup, N_("Backup existing destination files"), NULL },
|
{ "backup", 'b', 0, G_OPTION_ARG_NONE, &backup, N_("Backup existing destination files"), NULL },
|
||||||
{ "no-copy-fallback", 'C', 0, G_OPTION_ARG_NONE, &no_copy_fallback, N_("Don’t use copy and delete fallback"), NULL },
|
{ "no-copy-fallback", 'C', 0, G_OPTION_ARG_NONE, &no_copy_fallback, N_("Don’t use copy and delete fallback"), NULL },
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static gint64 start_time;
|
static gint64 start_time;
|
||||||
|
@ -33,7 +33,7 @@ static int n_outstanding = 0;
|
|||||||
static gboolean success = TRUE;
|
static gboolean success = TRUE;
|
||||||
|
|
||||||
static const GOptionEntry entries[] = {
|
static const GOptionEntry entries[] = {
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -29,7 +29,7 @@ static gboolean force = FALSE;
|
|||||||
|
|
||||||
static const GOptionEntry entries[] = {
|
static const GOptionEntry entries[] = {
|
||||||
{"force", 'f', 0, G_OPTION_ARG_NONE, &force, N_("Ignore nonexistent files, never prompt"), NULL},
|
{"force", 'f', 0, G_OPTION_ARG_NONE, &force, N_("Ignore nonexistent files, never prompt"), NULL},
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
|
|
||||||
|
|
||||||
static const GOptionEntry entries[] = {
|
static const GOptionEntry entries[] = {
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
int
|
int
|
||||||
|
@ -55,7 +55,7 @@ static const GOptionEntry entries[] =
|
|||||||
{ "print-etag", 'v', 0, G_OPTION_ARG_NONE, &print_etag, N_("Print new etag at end"), NULL },
|
{ "print-etag", 'v', 0, G_OPTION_ARG_NONE, &print_etag, N_("Print new etag at end"), NULL },
|
||||||
/* Translators: The "etag" is a token allowing to verify whether a file has been modified */
|
/* Translators: The "etag" is a token allowing to verify whether a file has been modified */
|
||||||
{ "etag", 'e', 0, G_OPTION_ARG_STRING, &etag, N_("The etag of the file being overwritten"), N_("ETAG") },
|
{ "etag", 'e', 0, G_OPTION_ARG_STRING, &etag, N_("The etag of the file being overwritten"), N_("ETAG") },
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
/* 256k minus malloc overhead */
|
/* 256k minus malloc overhead */
|
||||||
|
@ -32,7 +32,7 @@ static gboolean nofollow_symlinks = FALSE;
|
|||||||
static const GOptionEntry entries[] = {
|
static const GOptionEntry entries[] = {
|
||||||
{ "type", 't', 0, G_OPTION_ARG_STRING, &attr_type, N_("Type of the attribute"), N_("TYPE") },
|
{ "type", 't', 0, G_OPTION_ARG_STRING, &attr_type, N_("Type of the attribute"), N_("TYPE") },
|
||||||
{ "nofollow-symlinks", 'n', 0, G_OPTION_ARG_NONE, &nofollow_symlinks, N_("Don’t follow symbolic links"), NULL },
|
{ "nofollow-symlinks", 'n', 0, G_OPTION_ARG_NONE, &nofollow_symlinks, N_("Don’t follow symbolic links"), NULL },
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
|
@ -35,7 +35,7 @@ static const GOptionEntry entries[] = {
|
|||||||
{ "list", 0, 0, G_OPTION_ARG_NONE, &list, N_("List files in the trash with their original locations"), NULL },
|
{ "list", 0, 0, G_OPTION_ARG_NONE, &list, N_("List files in the trash with their original locations"), NULL },
|
||||||
{ "restore", 0, 0, G_OPTION_ARG_NONE, &restore, N_("Restore a file from trash to its original location (possibly "
|
{ "restore", 0, 0, G_OPTION_ARG_NONE, &restore, N_("Restore a file from trash to its original location (possibly "
|
||||||
"recreating the directory)"), NULL },
|
"recreating the directory)"), NULL },
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -31,7 +31,7 @@ static gboolean follow_symlinks = FALSE;
|
|||||||
static const GOptionEntry entries[] = {
|
static const GOptionEntry entries[] = {
|
||||||
{ "hidden", 'h', 0, G_OPTION_ARG_NONE, &show_hidden, N_("Show hidden files"), NULL },
|
{ "hidden", 'h', 0, G_OPTION_ARG_NONE, &show_hidden, N_("Show hidden files"), NULL },
|
||||||
{ "follow-symlinks", 'l', 0, G_OPTION_ARG_NONE, &follow_symlinks, N_("Follow symbolic links, mounts and shortcuts"), NULL },
|
{ "follow-symlinks", 'l', 0, G_OPTION_ARG_NONE, &follow_symlinks, N_("Follow symbolic links, mounts and shortcuts"), NULL },
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static gint
|
static gint
|
||||||
|
@ -747,7 +747,7 @@ main (int argc, char **argv)
|
|||||||
{ "internal", 0, 0, G_OPTION_ARG_NONE, &internal, N_("Don’t export functions; declare them G_GNUC_INTERNAL"), NULL },
|
{ "internal", 0, 0, G_OPTION_ARG_NONE, &internal, N_("Don’t export functions; declare them G_GNUC_INTERNAL"), NULL },
|
||||||
{ "external-data", 0, 0, G_OPTION_ARG_NONE, &external_data, N_("Don’t embed resource data in the C file; assume it's linked externally instead"), NULL },
|
{ "external-data", 0, 0, G_OPTION_ARG_NONE, &external_data, N_("Don’t embed resource data in the C file; assume it's linked externally instead"), NULL },
|
||||||
{ "c-name", 0, 0, G_OPTION_ARG_STRING, &c_name, N_("C identifier name used for the generated source code"), NULL },
|
{ "c-name", 0, 0, G_OPTION_ARG_STRING, &c_name, N_("C identifier name used for the generated source code"), NULL },
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
#ifdef G_OS_WIN32
|
#ifdef G_OS_WIN32
|
||||||
|
@ -7,7 +7,7 @@ int port = 7777;
|
|||||||
static GOptionEntry cmd_entries[] = {
|
static GOptionEntry cmd_entries[] = {
|
||||||
{"port", 'p', 0, G_OPTION_ARG_INT, &port,
|
{"port", 'p', 0, G_OPTION_ARG_INT, &port,
|
||||||
"Local port to bind to", NULL},
|
"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},
|
{"to-charset", 0, 0, G_OPTION_ARG_STRING, &to_charset, "to charset", NULL},
|
||||||
{"fallback", 0, 0, G_OPTION_ARG_NONE, &fallback, "use fallback", 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},
|
{G_OPTION_REMAINING, 0, 0, G_OPTION_ARG_FILENAME_ARRAY, &locations, "locations", NULL},
|
||||||
{NULL}
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -17,7 +17,7 @@ my_cmdline_handler (gpointer data)
|
|||||||
{ "arg1", 0, 0, G_OPTION_ARG_INT, &arg1, NULL, NULL },
|
{ "arg1", 0, 0, G_OPTION_ARG_INT, &arg1, NULL, NULL },
|
||||||
{ "arg2", 0, 0, G_OPTION_ARG_NONE, &arg2, NULL, NULL },
|
{ "arg2", 0, 0, G_OPTION_ARG_NONE, &arg2, NULL, NULL },
|
||||||
{ "help", '?', 0, G_OPTION_ARG_NONE, &help, NULL, NULL },
|
{ "help", '?', 0, G_OPTION_ARG_NONE, &help, NULL, NULL },
|
||||||
{ NULL }
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
GError *error;
|
GError *error;
|
||||||
gint i;
|
gint i;
|
||||||
|
@ -53,7 +53,7 @@ main (int argc, char **argv)
|
|||||||
/* A dummy flag option, to be handled in primary */
|
/* A dummy flag option, to be handled in primary */
|
||||||
{ "flag", 'f', G_OPTION_FLAG_NONE, G_OPTION_ARG_NONE, NULL, "A flag argument", NULL },
|
{ "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",
|
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 },
|
{ "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-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 },
|
{ "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 ("");
|
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 },
|
{ "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 },
|
{ "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 },
|
{ "name", 'n', 0, G_OPTION_ARG_STRING, &opt_name, "Name to acquire", NULL },
|
||||||
{ NULL}
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
error = 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 },
|
{ "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 },
|
{ "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 },
|
{ "allow-anonymous", 'n', 0, G_OPTION_ARG_NONE, &opt_allow_anonymous, "Allow anonymous authentication", NULL },
|
||||||
{ NULL}
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
ret = 1;
|
ret = 1;
|
||||||
|
@ -9,7 +9,7 @@ static GOptionEntry opt_entries[] =
|
|||||||
{ "name", 'n', 0, G_OPTION_ARG_STRING, &opt_name, "Name to watch", NULL },
|
{ "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 },
|
{ "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},
|
{ "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
|
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 },
|
{ "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-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},
|
{ "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;
|
static GMainLoop *loop = NULL;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static GOptionEntry options[] = {
|
static GOptionEntry options[] = {
|
||||||
{NULL}
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -6,7 +6,7 @@ static char *root = NULL;
|
|||||||
static GOptionEntry cmd_entries[] = {
|
static GOptionEntry cmd_entries[] = {
|
||||||
{"port", 'p', 0, G_OPTION_ARG_INT, &port,
|
{"port", 'p', 0, G_OPTION_ARG_INT, &port,
|
||||||
"Local port to bind to", NULL},
|
"Local port to bind to", NULL},
|
||||||
{NULL}
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -1371,7 +1371,7 @@ main (int argc, char *argv[])
|
|||||||
{"verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "Be verbose", NULL},
|
{"verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose, "Be verbose", NULL},
|
||||||
{"posix", 'x', 0, G_OPTION_ARG_NONE, &posix_compat,
|
{"posix", 'x', 0, G_OPTION_ARG_NONE, &posix_compat,
|
||||||
"Test POSIX-specific features (unix permissions, symlinks)", NULL},
|
"Test POSIX-specific features (unix permissions, symlinks)", NULL},
|
||||||
{NULL}
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
test_suite = FALSE;
|
test_suite = FALSE;
|
||||||
|
@ -672,7 +672,7 @@ static const GOptionEntry option_entries[] = {
|
|||||||
{ "synchronous", 's', 0, G_OPTION_ARG_NONE, &synchronous, "Synchronous connections", NULL },
|
{ "synchronous", 's', 0, G_OPTION_ARG_NONE, &synchronous, "Synchronous connections", NULL },
|
||||||
{ "connectable", 'c', 0, G_OPTION_ARG_INT, &connectable_count, "Connectable count", "C" },
|
{ "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" },
|
{ "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
|
int
|
||||||
|
@ -20,7 +20,7 @@ static GOptionEntry cmd_entries[] = {
|
|||||||
"Time out socket I/O after the specified number of seconds", NULL},
|
"Time out socket I/O after the specified number of seconds", NULL},
|
||||||
{"verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
|
{"verbose", 'v', 0, G_OPTION_ARG_NONE, &verbose,
|
||||||
"Verbose debugging output", NULL},
|
"Verbose debugging output", NULL},
|
||||||
{NULL}
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static gpointer
|
static gpointer
|
||||||
|
@ -210,7 +210,7 @@ static GOptionEntry cmd_entries[] = {
|
|||||||
"Time to run each test in seconds", NULL},
|
"Time to run each test in seconds", NULL},
|
||||||
{"list", 'l', 0, G_OPTION_ARG_NONE, &list,
|
{"list", 'l', 0, G_OPTION_ARG_NONE, &list,
|
||||||
"List all available tests and exit", NULL},
|
"List all available tests and exit", NULL},
|
||||||
{NULL}
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static gpointer
|
static gpointer
|
||||||
|
@ -37,7 +37,7 @@ static GOptionEntry cmd_entries[] = {
|
|||||||
"Print extra information", NULL},
|
"Print extra information", NULL},
|
||||||
{"seconds", 's', 0, G_OPTION_ARG_INT, &test_length,
|
{"seconds", 's', 0, G_OPTION_ARG_INT, &test_length,
|
||||||
"Time to run each test in seconds", NULL},
|
"Time to run each test in seconds", NULL},
|
||||||
{NULL}
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef struct _PerformanceTest PerformanceTest;
|
typedef struct _PerformanceTest PerformanceTest;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user