On 29.09.2009 13:25, Jeff Trawick wrote:
> On Tue, Sep 29, 2009 at 7:00 AM, Guenter Knauf <[email protected]
> <mailto:[email protected]>> wrote:
> 
>     Hi,
>     Jie Gao schrieb:
>     > /usr/local/src/httpd-2.2.14/srclib/apr/libtool --silent
>     --mode=compile /opt/SUNWspro/bin/cc -g  -fast  -DSOLARIS2=10
>     -D_POSIX_PTHREAD_SEMANTICS -D_REENTRANT -D_LARGEFILE64_SOURCE
>     -DAP_DEBUG    -I/usr/local/src/httpd-2.2.14/srclib/pcre -I.
>     -I/usr/local/src/httpd-2.2.14/os/unix
>     -I/usr/local/src/httpd-2.2.14/server/mpm/worker
>     -I/usr/local/src/httpd-2.2.14/modules/http
>     -I/usr/local/src/httpd-2.2.14/modules/filters
>     -I/usr/local/src/httpd-2.2.14/modules/proxy
>     -I/usr/local/src/httpd-2.2.14/include
>     -I/usr/local/src/httpd-2.2.14/modules/generators
>     -I/usr/local/src/httpd-2.2.14/modules/mappers
>     -I/usr/local/src/httpd-2.2.14/modules/database
>     -I/usr/local/src/httpd-2.2.14/srclib/apr/include
>     -I/usr/local/src/httpd-2.2.14/srclib/apr-util/include
>     -I/usr/local/src/httpd-2.2.14/srclib/apr-util/xml/expat/lib
>     -I/usr/local/src/httpd-2.2.14/modules/proxy/../generators
>     -I/usr/sfw/include -I/usr/local/src/httpd-2.2.14/modules/ssl
>     -I/usr/local/src/httpd-2.2.14/modules/dav/main -prefer-non-pic -stat
>     ic -c util_script.c && touch util_script.lo
>     > "util_script.c", line 606: warning: statement not reached
> 
>     from what I see the Sun compiler is right again:
>     in util_script.c ap_scan_script_header_err_core() line 431 we have:
>        while (1) {
>     this is closed in line 604; and we can only leave the function within
>     the while loop, thus the 'return OK' in 606 can be removed:
> 
>     Index: util_script.c
>     ===================================================================
>     --- util_script.c       (Revision 819427)
>     +++ util_script.c       (Arbeitskopie)
>     @@ -602,8 +602,6 @@
>                 apr_table_add(merge, w, l);
>             }
>         }
>     -
>     -    return OK;
>      }
> 
> 
> That is likely to trigger a warning or error from some other compiler.
> 
> You could add a comment like "/* never reached */" before the "return
> OK" so that anybody who looks at such a warning in the future
> understands that it is intentional.

+1 to that, it's not only compilers reading the code. Humans do that to.

Reply via email to