httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ras...@madhaus.utcs.utoronto.ca
Subject More compiler warnings
Date Thu, 21 Mar 1996 17:25:48 GMT
I compiled the latest cvs tree on a Solaris 2.5 machine this morning
using gcc 2.7.2 -Wall.  Here are the warnings:


  util.c: In function `get_local_host':
  util.c:997: warning: implicit declaration of function `gethostname'

This one seems to be a Solaris'ism.  I can't find a gethostname
prototype in any of the system header files.  I would suggest adding
a manual prototype to conf.h.


  util_md5.c: In function `md5digest':
  util_md5.c:185: warning: suggest parentheses around assignment used as truth 
  
  value

Give that a couple of brackets on that line.


  mod_auth.c: In function `authenticate_basic_user':
  mod_auth.c:180: warning: implicit declaration of function `crypt'

I see this comment in the code:
    /* anyone know where the prototype for crypt is? */
Well, on Solaris 2.5 it is in /usr/include/crypt.h and it looks like
this:

   extern char *crypt(const char *, const char *);


  mod_include.c: In function `add_include_vars':
  mod_include.c:102: warning: int format, uid_t arg (arg 3)

Casting r->finfo.st_uid to int on line 102 there would do the trick for
this one.


  mod_userdir.c:70: warning: `/*' within comment
  mod_userdir.c:73: warning: `/*' within comment
  mod_userdir.c: In function `translate_userdir':
  mod_userdir.c:166: warning: suggest parentheses around assignment used as
  truth value

In the code we have:
 * UserDir /home/* /www     -> /home/bar/www/one/two.html
 *     NOTE: this ^ space only added allow it to work in a comment, ignore

Perhaps make that / * /www and add a couple of brackets on line 166

  mod_proxy.c: In function `cache_update':
  mod_proxy.c:1630: warning: unused variable `j'
  mod_proxy.c: In function `ftp_getrc':
  mod_proxy.c:2048: warning: `i' might be used uninitialized in this function
  mod_proxy.c: In function `ftp_handler':
  mod_proxy.c:2108: warning: `passlen' might be used uninitialized in this 
  function
  mod_proxy.c: At top level:
  mod_proxy.c:893: warning: `del_header' defined but not used

This one is a bit of a mess.


  mod_digest.c: In function `digest_check_auth':
  mod_digest.c:293: warning: unused variable `grpstatus'
  mod_digest.c:285: warning: unused variable `sec'

Couple of unused vars here.

It might not be a bad idea to compile with -Wall by default.

--
Rasmus Lerdorf
rasmus@madhaus.utcs.utoronto.ca

Mime
View raw message