www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tomas Hulek <thu...@cz.ibm.com>
Subject mod_jserv/5482: C source code violates ANSI norm
Date Thu, 16 Dec 1999 12:46:49 GMT

>Number:         5482
>Category:       mod_jserv
>Synopsis:       C source code violates ANSI norm
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    jserv
>State:          open
>Class:          sw-bug
>Submitter-Id:   apache
>Arrival-Date:   Thu Dec 16 04:50:00 PST 1999
>Originator:     thulek@cz.ibm.com
>Release:        N/A
AIX adis 2 4 000004003400

xlc (C for AIX) version 3.1.4
The source file src/c/jserv_mmap.c contains several constructs which are illegal in ANSI C.
 gcc maybe ignores it, but my compilet (xlc) rightly complains:

line 359 (function jserv_setalive()) - a void valued can NOT be returned
line 364 (function jserv_setdead()) -  a void valued can NOT be returned

line 429 (function jserv_getnext_host()) - typecast can NOT be applied to an lvalue

To correct these bugs in the source code is easy, but it would be nice to have the original
source in ANSI C.
Compile the module src/c/jserv_mmap.c in a ANSI C compiler other than gcc.
Do not use return statement on lines 359 and 364.
Do not use (int) typecast on line 429 (it is not necessary anyway).
[In order for any reply to be added to the PR database, you need]
[to include <apbugs@Apache.Org> in the Cc line and make sure the]
[subject line starts with the report component and number, with ]
[or without any 'Re:' prefixes (such as "general/1098:" or      ]
["Re: general/1098:").  If the subject doesn't match this       ]
[pattern, your message will be misfiled and ignored.  The       ]
["apbugs" address is not added to the Cc line of messages from  ]
[the database automatically because of the potential for mail   ]
[loops.  If you do not include this Cc, your reply may be ig-   ]
[nored unless you are responding to an explicit request from a  ]
[developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]

View raw message