[PATCH 1/4] main_cp.c: Unused value (CID #1255344)

Joel Sherrill joel.sherrill at gmail.com
Tue Apr 6 20:54:36 UTC 2021


On Tue, Apr 6, 2021 at 3:49 PM Ryan Long <ryan.long at oarcorp.com> wrote:

> Joel says the two are equivalent.
>

And Joel was wrong in that private conversation. :(

-DVAR ==> VAR is 1
#define VAR == VAR is nothing

The first case is required behavior from POSIX on a C compiler invocation.

--joel

>
> -----Original Message-----
> From: devel <devel-bounces at rtems.org> On Behalf Of Ryan Long
> Sent: Tuesday, April 6, 2021 3:36 PM
> To: Chris Johns <chrisj at rtems.org>
> Cc: devel at rtems.org
> Subject: RE: [PATCH 1/4] main_cp.c: Unused value (CID #1255344)
>
> Oh, I definitely missed that. I'm not sure though, but other patches have
> used #ifdef.  So I should only resubmit this patch then?
>
> -----Original Message-----
> From: Chris Johns <chrisj at rtems.org>
> Sent: Tuesday, April 6, 2021 3:29 PM
> To: Ryan Long <ryan.long at oarcorp.com>
> Cc: devel at rtems.org
> Subject: Re: [PATCH 1/4] main_cp.c: Unused value (CID #1255344)
>
>
> > On 6 Apr 2021, at 5:38 am, Ryan Long <ryan.long at oarcorp.com> wrote:
> >
> > CID 1255344: Unused value in copy().
> >
> > Closes #4339
> > ---
> > cpukit/libmisc/shell/main_cp.c | 64
> > ++++++++++++++++++++++++++++++++++++++++++
> > 1 file changed, 64 insertions(+)
> >
> > diff --git a/cpukit/libmisc/shell/main_cp.c
> > b/cpukit/libmisc/shell/main_cp.c index cddbc95..2984a50 100644
> > --- a/cpukit/libmisc/shell/main_cp.c
> > +++ b/cpukit/libmisc/shell/main_cp.c
> > @@ -310,11 +310,31 @@ copy(rtems_shell_cp_globals* cp_globals,
> >        case FTS_ERR:
> >            warnx("%s: %s",
> >                curr->fts_path, strerror(curr->fts_errno));
> > +        #if __rtems__
>
> Is this ok or should it be #ifdef?
>
> Chris
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
> _______________________________________________
> devel mailing list
> devel at rtems.org
> http://lists.rtems.org/mailman/listinfo/devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/devel/attachments/20210406/a161509c/attachment.html>


More information about the devel mailing list