mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2025-04-21 22:59:16 +02:00
Fix several signedness warnings in tests/gobject/performance-threaded.c
tests/gobject/performance-threaded.c: In function ‘run_test’: tests/gobject/performance-threaded.c:302:19: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘int’ 302 | for (i = 0; i < n_threads; i++) { | ^ tests/gobject/performance-threaded.c:308:19: error: comparison of integer expressions of different signedness: ‘guint’ {aka ‘unsigned int’} and ‘int’ 308 | for (i = 0; i < n_threads; i++) { | ^ tests/gobject/performance-threaded.c: In function ‘find_test’: tests/gobject/performance-threaded.c:324:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ 324 | for (i = 0; i < G_N_ELEMENTS (tests); i++) | ^ tests/gobject/performance-threaded.c: In function ‘main’: tests/gobject/performance-threaded.c:351:21: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ 351 | for (i = 0; i < G_N_ELEMENTS (tests); i++) | ^ tests/gobject/performance-threaded.c:369:21: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ 369 | for (i = 0; i < G_N_ELEMENTS (tests); i++) | ^
This commit is contained in:
parent
7ddcc082e2
commit
0ddadf14cc
@ -197,7 +197,7 @@ static const PerformanceTest tests[] = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
static gboolean verbose = FALSE;
|
static gboolean verbose = FALSE;
|
||||||
static int n_threads = 0;
|
static guint n_threads = 0;
|
||||||
static gboolean list = FALSE;
|
static gboolean list = FALSE;
|
||||||
static int test_length = DEFAULT_TEST_TIME;
|
static int test_length = DEFAULT_TEST_TIME;
|
||||||
|
|
||||||
@ -320,7 +320,7 @@ run_test (const PerformanceTest *test)
|
|||||||
static const PerformanceTest *
|
static const PerformanceTest *
|
||||||
find_test (const char *name)
|
find_test (const char *name)
|
||||||
{
|
{
|
||||||
int i;
|
gsize i;
|
||||||
for (i = 0; i < G_N_ELEMENTS (tests); i++)
|
for (i = 0; i < G_N_ELEMENTS (tests); i++)
|
||||||
{
|
{
|
||||||
if (strcmp (tests[i].name, name) == 0)
|
if (strcmp (tests[i].name, name) == 0)
|
||||||
@ -336,7 +336,7 @@ main (int argc,
|
|||||||
const PerformanceTest *test;
|
const PerformanceTest *test;
|
||||||
GOptionContext *context;
|
GOptionContext *context;
|
||||||
GError *error = NULL;
|
GError *error = NULL;
|
||||||
int i;
|
gsize i;
|
||||||
|
|
||||||
context = g_option_context_new ("GObject performance tests");
|
context = g_option_context_new ("GObject performance tests");
|
||||||
g_option_context_add_main_entries (context, cmd_entries, NULL);
|
g_option_context_add_main_entries (context, cmd_entries, NULL);
|
||||||
@ -357,9 +357,10 @@ main (int argc,
|
|||||||
|
|
||||||
if (argc > 1)
|
if (argc > 1)
|
||||||
{
|
{
|
||||||
for (i = 1; i < argc; i++)
|
gsize k;
|
||||||
|
for (k = 1; k < argc; k++)
|
||||||
{
|
{
|
||||||
test = find_test (argv[i]);
|
test = find_test (argv[k]);
|
||||||
if (test)
|
if (test)
|
||||||
run_test (test);
|
run_test (test);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user