delorie.com/archives/browse.cgi | search |
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 <eliz AT gnu DOT org> |
Subject: | Re: src/debug/fsdb/fullscr.c r1.12 |
In-reply-to: | <CAA2C=vCdzUiS1c87eECfRjkbYXWn_B318oimm9gFSxGsRHbE2g@mail.gmail.com> |
X-012-Sender: | halo1 AT inter DOT net DOT il |
To: | Ozkan Sezer <sezeroz AT gmail DOT com> |
Cc: | djgpp-workers AT delorie DOT com |
Message-id: | <83d2ypr2dw.fsf@gnu.org> |
References: | <CAA2C=vA8kNDh=c5jXJ1r0TxVPuvKz-QViG222j=oDghS-UxeLA AT mail DOT gmail DOT com> <CAA2C=vD+ykMBRW2wBsSbgD83VjjediRt=eCZbMy4aQXS1fkG2g AT mail DOT gmail DOT com> <50BE474B DOT 9000204 AT gmx DOT de> <83ip8hr51z DOT fsf AT gnu DOT org> <CAA2C=vCdzUiS1c87eECfRjkbYXWn_B318oimm9gFSxGsRHbE2g AT mail DOT gmail DOT com> |
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 |
> Date: Tue, 4 Dec 2012 22:11:30 +0200 > From: Ozkan Sezer <sezeroz AT gmail DOT com> > > > 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.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |