Re: [PATCH spice-server] red-record-qxl: fix clang warning

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

 



Ok,
Acked-by: Christophe Fergeau <cfergeau@xxxxxxxxxx>

On Mon, Mar 12, 2018 at 12:33:47PM +0000, Frediano Ziglio wrote:
> Fix clang warning:
> 
> red-record-qxl.c:893:13: error: variable 'fd_in' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
>         if (ret)
> 
> This is technically impossible but is not on a hot path.
> 
> Signed-off-by: Frediano Ziglio <fziglio@xxxxxxxxxx>
> ---
>  server/red-record-qxl.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/server/red-record-qxl.c b/server/red-record-qxl.c
> index 48b3169f..5f6b7aeb 100644
> --- a/server/red-record-qxl.c
> +++ b/server/red-record-qxl.c
> @@ -886,7 +886,7 @@ RedRecord *red_record_new(const char *filename)
>          GError *error = NULL;
>          GPid child_pid;
>          gboolean ret;
> -        gint fd_in;
> +        gint fd_in = -1;
>  
>          ret = g_shell_parse_argv(filter, &argc, &argv, &error);
>  
> -- 
> 2.14.3
> 
> _______________________________________________
> Spice-devel mailing list
> Spice-devel@xxxxxxxxxxxxxxxxxxxxx
> https://lists.freedesktop.org/mailman/listinfo/spice-devel

Attachment: signature.asc
Description: PGP signature

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
https://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]