uri: Fix compiler warnings with gcc
authorSebastian Dröge <sebastian@centricular.com>
Mon, 29 Sep 2014 12:54:37 +0000 (15:54 +0300)
committerSebastian Dröge <sebastian@centricular.com>
Mon, 29 Sep 2014 12:54:37 +0000 (15:54 +0300)
These are actually not true.

gsturi.c: In function '_gst_uri_string_to_table.constprop':
gsturi.c:1316:27: error: 'pct_kv_sep' may be used uninitialized in this function [-Werror=maybe-uninitialized]
             for (next_sep = strcasestr (value, pct_kv_sep); next_sep;
                           ^
gsturi.c:1283:24: error: 'pct_part_sep' may be used uninitialized in this function [-Werror=maybe-uninitialized]
               next_sep = strcasestr (next_sep + 1, pct_part_sep)) {
                        ^

gst/gsturi.c

index 1a88b5a..b932580 100644 (file)
@@ -1258,7 +1258,7 @@ _gst_uri_string_to_table (const gchar * str, const gchar * part_sep,
   GHashTable *new_table = NULL;
 
   if (str) {
-    gchar *pct_part_sep, *pct_kv_sep;
+    gchar *pct_part_sep = NULL, *pct_kv_sep = NULL;
     gchar **split_parts;
 
     new_table = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, g_free);