apr-bugs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 47191] New: Missing sentinel warning
Date Wed, 13 May 2009 10:39:44 GMT

           Summary: Missing sentinel warning
           Product: APR
           Version: HEAD
          Platform: All
        OS/Version: All
            Status: NEW
          Keywords: PatchAvailable
          Severity: minor
          Priority: P2
         Component: APR
        AssignedTo: bugs@apr.apache.org
        ReportedBy: rainer.jung@kippdata.de

Created an attachment (id=23650)
 --> (https://issues.apache.org/bugzilla/attachment.cgi?id=23650)
Adding stddef.h to header files using sentinel attribute.

In revision 683278 ( https://svn.apache.org/viewcvs.cgi?view=rev&rev=683278 ) a sentinel
attribute mark was introduced to some APR
functions (trunk and 1.4).

On Solaris 8 and 10 using GCC 4 I get warnings about missing sentinels in
function calls. It turns out, that this is due to "NULL" being defined as "0"
instead of e.g. (void *)0.

This comes from the inclusion of sys/types.h, which leads to iso/time_iso.h
being included. That file defines NULL as 0.

sys/types.h occurs very early in the list of includes in apr.h

For gcc 4.1.2 I can add stddef.h, because the fixincludes
version of it defines NULL as (void *)0.

Unfortunately apr does set HAVE_STDDEF_H only in apr_private.h, so we can't
simply add something like

#include <stddef.h> /* NULL */

to apr_strings.h etc. I think we need to add APR_HAVE_STDDEF_H to
apr.h(.in) (and configure) so we can use

#include <stddef.h> /* NULL */

in apr_strings.h and apr_tables.h.

I attach a patch for trunk and 1.4.x. The sentinel attribute does not exist in
other branches.



Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

To unsubscribe, e-mail: bugs-unsubscribe@apr.apache.org
For additional commands, e-mail: bugs-help@apr.apache.org

View raw message