delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2012/12/04/14:44:14

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 21:27:36 +0200
From: Eli Zaretskii <eliz AT gnu DOT org>
Subject: Re: src/debug/fsdb/fullscr.c r1.12
In-reply-to: <50BE474B.9000204@gmx.de>
X-012-Sender: halo1 AT inter DOT net DOT il
To: djgpp-workers AT delorie DOT com
Cc: sezeroz AT gmail DOT com
Message-id: <83ip8hr51z.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>
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, 04 Dec 2012 19:56:11 +0100
> From: Juan Manuel Guerrero <juan DOT guerrero AT gmx DOT de>
> CC: Ozkan Sezer <sezeroz AT gmail DOT com>
> 
> Am 04.12.2012 18:45, schrieb Ozkan Sezer:
> > On 12/4/12, Ozkan Sezer <sezeroz AT gmail DOT com> wrote:
> >> Hi:
> >>
> >> As far as I can see unassemble_proper() sets its len param, however
> >> src/debug/fsdb/fullscr.c r1.12 comments out the call to avoid set-but-
> >> unused warnings but 'len' is used two lines below.  So, unless I am
> >> missing something, the following is needed.
> >>
> > Slightly updated patch below.  (BTW, the whole thing can actually use
> > some constification: things like char* str="string"; are everywhere..)
> >
> >
> You are right.  I missed something when I tried to fix set-but-unused
> warnings.  Your patch is OK.

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?

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019