summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormonsta <[email protected]>2017-03-28 12:30:51 +0300
committermonsta <[email protected]>2017-03-28 12:32:47 +0300
commite3953e675e45d59ae0ef720e4bf65ea6bab97fb4 (patch)
tree155784f3dc352fe544077a8817bcd4dd368168cb
parent96fdd4f17237dc55be5e2a9cde5a20a23ce53086 (diff)
downloadcaja-e3953e675e45d59ae0ef720e4bf65ea6bab97fb4.tar.bz2
caja-e3953e675e45d59ae0ef720e4bf65ea6bab97fb4.tar.xz
fix build with gcc 4.9.2 (looks like it's in c89 mode by default)
-rw-r--r--libcaja-private/caja-search-engine-simple.c8
-rw-r--r--src/caja-query-editor.c4
2 files changed, 9 insertions, 3 deletions
diff --git a/libcaja-private/caja-search-engine-simple.c b/libcaja-private/caja-search-engine-simple.c
index 016b03e6..41021ef9 100644
--- a/libcaja-private/caja-search-engine-simple.c
+++ b/libcaja-private/caja-search-engine-simple.c
@@ -314,9 +314,13 @@ file_has_all_tags (GFileInfo *info, GList *tags)
return FALSE;
}
- for (GList *l = tags; l != NULL; l = l->next) {
+ GList *l;
+
+ for (l = tags; l != NULL; l = l->next) {
gboolean found = FALSE;
- for (int i = 0; i < file_tags_len; ++i) {
+ int i;
+
+ for (i = 0; i < file_tags_len; ++i) {
if (g_strcmp0 (l->data, file_tags[i]) == 0) {
found = TRUE;
break;
diff --git a/src/caja-query-editor.c b/src/caja-query-editor.c
index 5bfbf7ae..bb0f6036 100644
--- a/src/caja-query-editor.c
+++ b/src/caja-query-editor.c
@@ -412,7 +412,9 @@ tags_row_add_to_query (CajaQueryEditorRow *row,
char **strv = g_strsplit (tags, " ", -1);
guint len = g_strv_length (strv);
- for (int i=0; i<len; ++i) {
+ int i;
+
+ for (i = 0; i < len; ++i) {
strv[i] = g_strstrip (strv[i]);
if (strlen (strv[i]) > 0) {
caja_query_add_tag (query, strv[i]);