From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jason Gunthorpe Subject: Re: [PATCH 26/28] Avoid gcc 5.4 warning -Wunused-result Date: Sun, 9 Oct 2016 17:12:37 -0600 Message-ID: <20161009231237.GB23823@obsidianresearch.com> References: <1473109698-31408-1-git-send-email-jgunthorpe@obsidianresearch.com> <1473109698-31408-27-git-send-email-jgunthorpe@obsidianresearch.com> <3884fb5e-13a2-3ab6-0cce-66f73fbe84b7@acm.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Content-Disposition: inline In-Reply-To: <3884fb5e-13a2-3ab6-0cce-66f73fbe84b7-HInyCGIudOg@public.gmane.org> Sender: linux-rdma-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Bart Van Assche Cc: Doug Ledford , linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Devesh Sharma , Hal Rosenstock , Mike Marciniszyn , Moni Shoua , Sean Hefty , Steve Wise , Tatyana Nikolova , Vladimir Sokolovsky , Yishai Hadas List-Id: linux-rdma@vger.kernel.org On Sun, Oct 09, 2016 at 08:14:26AM -0700, Bart Van Assche wrote: > Are you aware that there are less intrusive ways to suppress "unused result" > warnings, e.g. by using a macro like the one below? > > #define UNUSED_VALUE(v) do { if (v) { } } while (0) Hmm, I think the only place I'd use that is the fscanf stuff - and that is only because I don't know about about that code to put in sensible error handling. It doesn't seem much better than the failable_fscanf wrapper? All the other places gained at least some kind of improvement in error handling.. Generally this warning is not wrong so I'm not excited to have 'official' infrastructure to ignore it. Jason -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html