mirror of
https://gitlab.gnome.org/GNOME/nautilus
synced 2024-10-02 14:03:39 +00:00
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) {
This commit is contained in:
parent
ca0e00b6b3
commit
9b674dc6ec
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue