From 524ee218ccd11bbb81e38dbc1b1bc35a0a58c9c0 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= <marcandre.lureau@redhat.com>
Date: Tue, 11 Mar 2014 14:52:36 +0100
Subject: [PATCH] Silence some gcc warnings
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

cc1: warnings being treated as errors
spice-uri.c: In function ‘spice_uri_parse’:
spice-uri.c:105: error: ‘saveptr’ may be used uninitialized in this
function [-Wuninitialized]
spice-uri.c:105: error: ‘saveptr2’ may be used uninitialized in this
function [-Wuninitialized]
---
 gtk/spice-uri.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gtk/spice-uri.c b/gtk/spice-uri.c
index c3790759..cf6e71b8 100644
--- a/gtk/spice-uri.c
+++ b/gtk/spice-uri.c
@@ -103,7 +103,7 @@ gboolean spice_uri_parse(SpiceURI *self, const gchar *_uri, GError **error)
 
     /* yes, that parser is bad, we need GUri... */
     if (strstr(uri, "@")) {
-        gchar *saveptr, *saveptr2;
+        gchar *saveptr = NULL, *saveptr2 = NULL;
         gchar *next = strstr(uri, "@") + 1;
         gchar *auth = strtok_r(uri, "@", &saveptr);
         const gchar *user = strtok_r(auth, ":", &saveptr2);
-- 
GitLab