Re: [PATCH spice-gtk] Silence some gcc warnings

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



ACK

----- Original Message -----
> From: "Marc-André Lureau" <marcandre.lureau@xxxxxxxxx>
> To: spice-devel@xxxxxxxxxxxxxxxxxxxxx
> Sent: Tuesday, March 11, 2014 8:53:37 AM
> Subject:  [PATCH spice-gtk] Silence some gcc warnings
> 
> 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 03b8c22..5180b74 100644
> --- a/gtk/spice-uri.c
> +++ b/gtk/spice-uri.c
> @@ -102,7 +102,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);
> --
> 1.8.5.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> http://lists.freedesktop.org/mailman/listinfo/spice-devel
> 
_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]