Re: [PATCH v6 1/5] Quiet uninitialized variable warning.

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

 



On Thu, Jan 26, 2017 at 03:05:18AM -0500, Frediano Ziglio wrote:
> > 
> > Signed-off-by: Michal Suchanek <msuchanek@xxxxxxx>
> > ---
> > v2:
> >  - use g_return_if_reached
> > ---
> >  src/vdagentd/vdagentd.c | 2 ++
> >  1 file changed, 2 insertions(+)
> > 
> > diff --git a/src/vdagentd/vdagentd.c b/src/vdagentd/vdagentd.c
> > index a1faf23..e2d6159 100644
> > --- a/src/vdagentd/vdagentd.c
> > +++ b/src/vdagentd/vdagentd.c
> > @@ -305,6 +305,8 @@ static void do_client_file_xfer(struct
> > vdagent_virtio_port *vport,
> >          id = d->id;
> >          break;
> >      }
> > +    default:
> > +        g_return_if_reached();
> >      }
> >  
> >      conn = g_hash_table_lookup(active_xfers, GUINT_TO_POINTER(id));
> 
> This patch got different comments. Ack or nack?

At the very least, I'd add
https://lists.freedesktop.org/archives/spice-devel/2017-January/034864.html
to the log. Still a bit reluctant to add this as this is not happening
to me on gcc 6, but my gcc is not warning either if do_client_file_xfer()
is not handling all 3 values that it can be called with, so should not
hurt to have this.

Christophe

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]