You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Jeff Trawick <tr...@attglobal.net> on 2003/03/27 14:45:18 UTC
int/ptr size mismatch warnings with gcc 3.2 on Linux on ia64
use mod_cgid from HEAD an example...
mod_cgid.c: In function `cgid_server':
mod_cgid.c:694: warning: cast from pointer to integer of different size
mod_cgid.c:767: warning: cast to pointer from integer of different size
mod_cgid.c: In function `close_unix_socket':
mod_cgid.c:1048: warning: cast from pointer to integer of different size
mod_cgid.c: In function `connect_to_daemon':
mod_cgid.c:1091: warning: cast to pointer from integer of different size
mod_cgid.c: In function `cgid_handler':
mod_cgid.c:1449: warning: cast to pointer from integer of different size
mod_cgid.c:1461: warning: cast to pointer from integer of different size
mod_cgid.c: In function `include_cmd':
mod_cgid.c:1686: warning: cast to pointer from integer of different size
AFAICT, all these operations are safe on systems where sizeof(int) <=
sizeof(void *) and sizeof(pid_t) <= sizeof(void *) (i.e., just about
everything where you'd expect to run Apache or APR). Is anybody seeing
stuff like this with other compilers?
The attached clumsy patch below axes the warnings, but it sure seems
like overkill. Allocating extra storage from pools to get rid of the
warnings doesn't seem to be cool either.