You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Marc Slemko <ma...@znep.com> on 1997/07/24 07:24:43 UTC
warning on Solaris 2.5.1 x86
gcc -c -O2 -DSOLARIS2=251 http_main.c
http_main.c: In function `sock_bind': http_main.c:1813: warning: passing arg 2 of `bind' discards `const' from pointer target type
This changed when Dean made sock_bind. Will just removing the const cause
any warnings on other platforms?
Re: warning on Solaris 2.5.1 x86
Posted by Dean Gaudet <dg...@arctic.org>.
On Wed, 23 Jul 1997, Marc Slemko wrote:
> gcc -c -O2 -DSOLARIS2=251 http_main.c
> http_main.c: In function `sock_bind': http_main.c:1813: warning: passing arg 2 of `bind' discards `const' from pointer target type
>
> This changed when Dean made sock_bind. Will just removing the const cause
> any warnings on other platforms?
No, but you'll have to remove it from the prototype of sock_bind, and
make_sock too. imho this is a solaris 2.5.1/x86 header file bug and not
worth working around.
Passing a non-const to a const is fine.
Passing a const to a non-const generates warnings.
Dean