From mboxrd@z Thu Jan 1 00:00:00 1970 From: Olaf Hering Subject: Re: [PATCH 14 of 18] tools/libvchan: fix build errors caused by Werror in io.c Date: Tue, 3 Apr 2012 17:04:28 +0200 Message-ID: <20120403150428.GB8190@aepfle.de> References: <3d15aa971865cf18dac4.1333397737@probook.site> <20346.53247.182217.288605@mariner.uk.xensource.com> <1333450222.25602.131.camel@zakaz.uk.xensource.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Content-Disposition: inline In-Reply-To: <1333450222.25602.131.camel@zakaz.uk.xensource.com> List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org To: Ian Campbell Cc: "xen-devel@lists.xensource.com" , Ian Jackson List-Id: xen-devel@lists.xenproject.org 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. Olaf