>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
>Last-Modified:
>Originator:     [EMAIL PROTECTED]
>Organization:
apache
>Release:        N/A
>Environment:
AIX adis 2 4 000004003400

xlc (C for AIX) version 3.1.4
>Description:
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.
>How-To-Repeat:
Compile the module src/c/jserv_mmap.c in a ANSI C compiler other than gcc.
>Fix:
Do not use return statement on lines 359 and 364.
Do not use (int) typecast on line 429 (it is not necessary anyway).
>Audit-Trail:
>Unformatted:
[In order for any reply to be added to the PR database, you need]
[to include <[EMAIL PROTECTED]> 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!     ]



Reply via email to