mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-21 14:49:16 +02:00
Fix global variable name hidden by local variables in glib/tests/option-context.c
This commit is contained in:
parent
fb939a0029
commit
2885cbd737
@ -28,15 +28,14 @@
|
|||||||
#include <locale.h>
|
#include <locale.h>
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
|
|
||||||
|
static GOptionEntry global_main_entries[] = {
|
||||||
static GOptionEntry main_entries[] = {
|
|
||||||
{ "main-switch", 0, 0,
|
{ "main-switch", 0, 0,
|
||||||
G_OPTION_ARG_NONE, NULL,
|
G_OPTION_ARG_NONE, NULL,
|
||||||
"A switch that is in the main group", NULL },
|
"A switch that is in the main group", NULL },
|
||||||
G_OPTION_ENTRY_NULL
|
G_OPTION_ENTRY_NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
static GOptionEntry group_entries[] = {
|
static GOptionEntry global_group_entries[] = {
|
||||||
{ "test-switch", 0, 0,
|
{ "test-switch", 0, 0,
|
||||||
G_OPTION_ARG_NONE, NULL,
|
G_OPTION_ARG_NONE, NULL,
|
||||||
"A switch that is in the test group", NULL },
|
"A switch that is in the test group", NULL },
|
||||||
@ -54,14 +53,14 @@ make_options (int test_number)
|
|||||||
options = g_option_context_new (NULL);
|
options = g_option_context_new (NULL);
|
||||||
|
|
||||||
if (have_main_entries)
|
if (have_main_entries)
|
||||||
g_option_context_add_main_entries (options, main_entries, NULL);
|
g_option_context_add_main_entries (options, global_main_entries, NULL);
|
||||||
if (have_test_entries)
|
if (have_test_entries)
|
||||||
{
|
{
|
||||||
group = g_option_group_new ("test", "Test Options",
|
group = g_option_group_new ("test", "Test Options",
|
||||||
"Show all test options",
|
"Show all test options",
|
||||||
NULL, NULL);
|
NULL, NULL);
|
||||||
g_option_context_add_group (options, group);
|
g_option_context_add_group (options, group);
|
||||||
g_option_group_add_entries (group, group_entries);
|
g_option_group_add_entries (group, global_group_entries);
|
||||||
}
|
}
|
||||||
|
|
||||||
return options;
|
return options;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user