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

Re: [Xen-devel] [PATCH 14 of 18] tools/libvchan: fix build errors caused by Werror in io.c



On Tue, 2012-04-03 at 16:04 +0100, Olaf Hering wrote:
> On Tue, Apr 03, Ian Campbell wrote:
> 
> > On Tue, 2012-04-03 at 11:25 +0100, Ian Jackson wrote:
> > > Olaf Hering writes ("[PATCH 14 of 18] tools/libvchan: fix build errors 
> > > caused by Werror in io.c"):
> > > > tools/libvchan: fix build errors caused by Werror in io.c
> > > ...
> > > > io.c:196: warning: ignoring return value of 'writev', declared with 
> > > > attribute warn_unused_result
> > > ...
> > > > -               writev(-1, iov, 2);
> > > > +               /* Silence gcc warning, will always fail */
> > > > +               if (writev(-1, iov, 2));
> > > 
> > > I still think this is an unpleasant idiom.  Does casting the result to
> > > void not help ?
> 
> Just '(void)writev(...);' does not prevent the warning.
> 
> > What does writev(-1,...) even mean? Can we not just nuke it?
> 
> Its just there for debugging with strace. Wether the whole debug ca be
> removed, no idea.

Lets just nuke it then, someone who is debugging libvchan can add things
like this locally if they need to.

Ian.


_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.