diff options
author | Emmanuele Bassi <ebassi@gnome.org> | 2016-07-10 13:46:24 +0100 |
---|---|---|
committer | Emmanuele Bassi <ebassi@gnome.org> | 2016-07-10 13:46:24 +0100 |
commit | 9b674dc6ec197d419fa2503625598e12f75955c6 (patch) | |
tree | 4a32445936e01efdcd68262e8966b532258263e5 /test | |
parent | ca0e00b6b3c48a61f0ad091e6ae16d4f4e3e39fb (diff) | |
download | nautilus-9b674dc6ec197d419fa2503625598e12f75955c6.tar.gz |
tests: Fix build failure caused by C99 use
Build failure in Continuous:
../../test/test-file-utilities-get-common-filename-prefix.c: In function
'test_many_strings':
../../test/test-file-utilities-get-common-filename-prefix.c:366:9:
error: 'for' loop initial declarations are only allowed in C99 or C11
mode
for (int i = 0; i < 500; ++i) {
Diffstat (limited to 'test')
-rw-r--r-- | test/test-file-utilities-get-common-filename-prefix.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/test/test-file-utilities-get-common-filename-prefix.c b/test/test-file-utilities-get-common-filename-prefix.c index 2eaaa9c46..786c7dfb8 100644 --- a/test/test-file-utilities-get-common-filename-prefix.c +++ b/test/test-file-utilities-get-common-filename-prefix.c @@ -362,8 +362,9 @@ test_many_strings () GList *list = NULL; char *actual; char *filename; + int i; - for (int i = 0; i < 500; ++i) { + for (i = 0; i < 500; ++i) { filename = g_strdup_printf ("we are no longer the knights who say nii%d", i); list = g_list_append (list, filename); } @@ -381,8 +382,9 @@ test_many_strings_last_differs () GList *list = NULL; char *actual; char *filename; + int i; - for (int i = 0; i < 500; ++i) { + for (i = 0; i < 500; ++i) { filename = g_strdup_printf ("we are no longer the knights who say nii%d", i); if (i == 499) { @@ -405,8 +407,9 @@ test_many_strings_first_differs () GList *list = NULL; char *actual; char *filename; + int i; - for (int i = 0; i < 500; ++i) { + for (i = 0; i < 500; ++i) { filename = g_strdup_printf ("we are no longer the knights who say nii%d", i); if (i == 0) { |