apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stein <gst...@lyra.org>
Subject Re: Sun forte compiler warnings
Date Fri, 13 Sep 2002 21:34:49 GMT
On Fri, Sep 13, 2002 at 09:23:37AM -0700, Aaron Bannert wrote:
> On Fri, Sep 13, 2002 at 01:16:48AM -0700, Justin Erenkrantz wrote:
> > - apr/shmem/unix/shm.c - lots of code fragments result in unreachable
> >   code because we use #ifdef's and then after all the #ifdef's we
> >   return APR_ENOTIMPL.  Therefore, this results in the final return
> >   being unreachable (all code paths return before we hit the final
> >   APR_ENOTIMPL).  We really should be able to catch this not-impl
> >   case at pre-processor time, but some of the conditions are really
> >   convoluted.
> I can't remember my password or which key I used on nagoya, so I
> don't have access to any Forte machines, but here's a patch that
> doesn't break anything for me on Darwin. Let me know if it does
> the trick and I'll commit it.

The #if logic is awfully hair. I'd recommend creating some internal symbols
that describe the semantics of what you're checking for.

For example:

#if !defined(SOMETHING) && !defined(OR_OTHER)



Greg Stein, http://www.lyra.org/

View raw message