mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Fix several signedness warnings in glib/tests/uri.c
glib/tests/uri.c: In function ‘run_file_to_uri_tests’: glib/tests/uri.c:172:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ 172 | for (i = 0; i < G_N_ELEMENTS (file_to_uri_tests); i++) | ^ glib/tests/uri.c: In function ‘run_file_from_uri_tests’: glib/tests/uri.c:197:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ 197 | for (i = 0; i < G_N_ELEMENTS (file_from_uri_tests); i++) | ^ glib/tests/uri.c: In function ‘run_file_roundtrip_tests’: glib/tests/uri.c:276:17: error: comparison of integer expressions of different signedness: ‘int’ and ‘long unsigned int’ 276 | for (i = 0; i < G_N_ELEMENTS (file_to_uri_tests); i++) | ^ glib/tests/uri.c: In function ‘test_uri_parse_params’: glib/tests/uri.c:1594:25: error: comparison of integer expressions of different signedness: ‘gsize’ {aka ‘long unsigned int’} and ‘gssize’ {aka ‘const long int’} 1594 | for (j = 0; j < params_tests[i].expected_n_params; j += 2) | ^
This commit is contained in:
parent
8aa6e39cc0
commit
e457df8b8b
@ -165,7 +165,7 @@ file_from_uri_tests[] = {
|
||||
static void
|
||||
run_file_to_uri_tests (void)
|
||||
{
|
||||
int i;
|
||||
gsize i;
|
||||
gchar *res;
|
||||
GError *error;
|
||||
|
||||
@ -189,7 +189,7 @@ run_file_to_uri_tests (void)
|
||||
static void
|
||||
run_file_from_uri_tests (void)
|
||||
{
|
||||
int i;
|
||||
gsize i;
|
||||
gchar *res;
|
||||
gchar *hostname;
|
||||
GError *error;
|
||||
@ -269,7 +269,7 @@ safe_strcmp_hostname (const gchar *a, const gchar *b)
|
||||
static void
|
||||
run_file_roundtrip_tests (void)
|
||||
{
|
||||
int i;
|
||||
gsize i;
|
||||
gchar *uri, *hostname, *res;
|
||||
GError *error;
|
||||
|
||||
@ -1591,7 +1591,7 @@ test_uri_parse_params (gconstpointer test_data)
|
||||
g_assert_no_error (err);
|
||||
g_assert_cmpint (g_hash_table_size (params), ==, params_tests[i].expected_n_params);
|
||||
|
||||
for (j = 0; j < params_tests[i].expected_n_params; j += 2)
|
||||
for (j = 0; j < (gsize) params_tests[i].expected_n_params; j += 2)
|
||||
g_assert_cmpstr (g_hash_table_lookup (params, params_tests[i].expected_param_key_values[j]), ==,
|
||||
params_tests[i].expected_param_key_values[j + 1]);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user