X-Authentication-Warning: delorie.com: mail set sender to djgpp-workers-bounces using -f X-Recipient: djgpp-workers AT delorie DOT com Date: Tue, 04 Dec 2012 22:25:15 +0200 From: Eli Zaretskii Subject: Re: src/debug/fsdb/fullscr.c r1.12 In-reply-to: X-012-Sender: halo1 AT inter DOT net DOT il To: Ozkan Sezer Cc: djgpp-workers AT delorie DOT com Message-id: <83d2ypr2dw.fsf@gnu.org> References: <50BE474B DOT 9000204 AT gmx DOT de> <83ip8hr51z DOT fsf AT gnu DOT org> Reply-To: djgpp-workers AT delorie DOT com Errors-To: nobody AT delorie DOT com X-Mailing-List: djgpp-workers AT delorie DOT com X-Unsubscribes-To: listserv AT delorie DOT com Precedence: bulk > Date: Tue, 4 Dec 2012 22:11:30 +0200 > From: Ozkan Sezer > > > Why is it better to do this: > > > > inst = unassemble_proper (j, &len); > > (void) inst; /* set, but not used. */ > > > > instead of this: > > > > unassemble_proper (j, &len); > > > > Is it "verboten" to discard the return value of a function, for some > > reason? Some exciting new "feature" of the latest GCC versions or > > something? > > > > I kept the unused var only because it is referenced in the if 0'ed > out block. Otherwise, yours is just fine too. If your version is to > be preferred, then it is advisable to remove that if 0'ed out block > as well. IMO, if we want to ignore the return value, let's do that in the most natural way, which is not assign it to any variable. Like we do with printf, for example, when we don't need its return value.