From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28766 invoked by alias); 7 Dec 2001 06:14:08 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 28731 invoked from network); 7 Dec 2001 06:14:03 -0000 Received: from unknown (HELO fencepost.gnu.org) (199.232.76.164) by sources.redhat.com with SMTP; 7 Dec 2001 06:14:03 -0000 Received: from smtp1.legato.com ([137.69.200.1]) by fencepost.gnu.org with esmtp (Exim 3.22 #1 (Debian)) id 16CEGo-00075Y-00 for ; Fri, 07 Dec 2001 01:14:03 -0500 Received: from mta1.legato.com (mta1.legato.com [137.69.1.14]) by smtp1.legato.com (Switch-2.1.3/Switch-2.1.0) with ESMTP id fB76DgM15463; Thu, 6 Dec 2001 22:13:42 -0800 (PST) Received: from mail.legato.com (mail [137.69.1.58]) by mta1.legato.com (Switch-2.1.3/Switch-2.1.0) with ESMTP id fB76Dau15397; Thu, 6 Dec 2001 22:13:36 -0800 (PST) Received: from gadzooks (gadzooks.legato.com [137.69.4.92]) by mail.legato.com (SendmailServer-1.0.4/8.11.1) with SMTP id fB76D9k20614; Thu, 6 Dec 2001 22:13:09 -0800 (PST) Message-ID: <0cca01c17ee6$363cd9e0$5c044589@legato.com> From: "David E. Weekly" To: "Fergus Henderson" Cc: References: <0c4f01c17edd$5bbbefc0$5c044589@legato.com> <20011207170238.A2078@hg.cs.mu.oz.au> Subject: Re: Patch to Add -Wunused-returns Date: Thu, 06 Dec 2001 23:32:00 -0000 Organization: Legato Systems, Inc. MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2600.0000 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000 X-SW-Source: 2001-12/txt/msg00351.txt.bz2 Fergus, Thanks for your comments! >>> I don't see what the point of the second `if' is. Surely the same warning should be issued for calls via function pointers as is issued for ordinary calls. <<< Good point. And I like your idea of printing the function name, too. Shall I use this code? >>> I'm not sure that close() is a good example here, since checking the return value from close() for files opened in output mode is very important, and it would be bad to encourage people to omit that. <<< Very fair. How about "strcpy()" as another example of where most people usually (and rightfully) cast away the return value? -d