Skip to content

Commit 13afae5

Browse files
committed
build: Fix some warnings.
1 parent 8ff42b6 commit 13afae5

4 files changed

Lines changed: 7 additions & 24 deletions

File tree

libnemo-private/nemo-action.c

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1457,11 +1457,7 @@ get_insertion_string (NemoAction *action,
14571457
break;
14581458
}
14591459

1460-
gchar *ret = str->str;
1461-
1462-
g_string_free (str, FALSE);
1463-
1464-
return ret;
1460+
return g_string_free (str, FALSE);
14651461
}
14661462

14671463
static GString *
@@ -1617,9 +1613,7 @@ get_final_label (NemoAction *action,
16171613

16181614
DEBUG ("Action Label: %s", str->str);
16191615

1620-
gchar *ret = str->str;
1621-
g_string_free (str, FALSE);
1622-
return ret;
1616+
return g_string_free (str, FALSE);
16231617
}
16241618

16251619
static gchar *
@@ -1642,9 +1636,7 @@ get_final_tt (NemoAction *action,
16421636

16431637
DEBUG ("Action Tooltip: %s", str->str);
16441638

1645-
gchar *ret = str->str;
1646-
g_string_free (str, FALSE);
1647-
return ret;
1639+
return g_string_free (str, FALSE);
16481640
}
16491641

16501642
static void

libnemo-private/nemo-search-engine-advanced.c

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -801,9 +801,7 @@ load_contents (SearchThreadData *data,
801801
break;
802802
}
803803

804-
if (chunk != NULL) {
805-
g_string_append_len (str, chunk, len);
806-
}
804+
g_string_append_len (str, chunk, len);
807805
} while (!g_cancellable_is_cancelled (data->cancellable));
808806

809807
g_input_stream_close (stream,

search-helpers/nemo-mso-to-txt.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -61,11 +61,8 @@ process_file (GString *collective,
6161

6262
gsf_input_read (GSF_INPUT (file), size, chunk);
6363

64-
if (chunk != NULL)
65-
{
66-
remaining -= size;
67-
contents = g_string_append_len (contents, (const gchar *) chunk, size);
68-
}
64+
remaining -= size;
65+
contents = g_string_append_len (contents, (const gchar *) chunk, size);
6966
} while (remaining > 0);
7067

7168
g_string_append (contents, " ");

src/nemo-properties-window.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4719,7 +4719,6 @@ get_pending_key (GList *file_list)
47194719
GList *l;
47204720
GList *uris;
47214721
GString *key;
4722-
char *ret;
47234722

47244723
uris = NULL;
47254724
for (l = file_list; l != NULL; l = l->next) {
@@ -4735,10 +4734,7 @@ get_pending_key (GList *file_list)
47354734

47364735
g_list_free_full (uris, g_free);
47374736

4738-
ret = key->str;
4739-
g_string_free (key, FALSE);
4740-
4741-
return ret;
4737+
return g_string_free (key, FALSE);
47424738
}
47434739

47444740
static StartupData *

0 commit comments

Comments
 (0)