Re: main/network.c

[email protected] (Wez Furlong)
Newsgroups php.dev
Message-ID <[email protected]>
Hi marcus,

Moriyoshi is going to revert the HAVE_INET_NTOP part;
I have to go out now, so I won't be able to address the warnings right
away, but will look at them later.

--Wez.

On Sat, 1 Mar 2003, Marcus [iso-8859-1] Börger wrote:

> Hi Wez,
>
> i cannot compile current network.c. The following patch fixes two warnings
> and one error
> but one warning is left:
> /usr/src/php4-HEAD/main/network.c: In function `php_network_accept_incoming':
> /usr/src/php4-HEAD/main/network.c:608: warning: `error' might be used
> uninitialized in this function
>
> If i understand code and message correct - then indeed this could be a real
> error because it is possible to return an uninitialised error code there.
>
> since you're the one knowing the correct default error codes i leave it up
> to you :-)
>
> regards
> marcus
>
> Index: main/network.c
> ===================================================================
> RCS file: /repository/php4/main/network.c,v
> retrieving revision 1.95
> diff -u -r1.95 network.c
> --- main/network.c      28 Feb 2003 21:03:36 -0000      1.95
> +++ main/network.c      1 Mar 2003 15:48:30 -0000
> @@ -434,6 +434,7 @@
>                                  break;
>                          default:
>                                  /* Unknown family */
> +                               socklen = 0; /* fix warning */
>                                  sa = NULL;
>                  }
>
> @@ -493,7 +494,7 @@
>          }
>
>          if (textaddr) {
> -#if HAVE_IPV6 && HAVE_INET_NTOP
> +#if HAVE_IPV6
>                  char abuf[256];
>   #endif
>                  char *buf = NULL;
> @@ -711,6 +712,7 @@
>                                  break;
>                          default:
>                                  /* Unknown family */
> +                               socklen = 0; /* fix warning */
>                                  sa = NULL;
>                  }
>
>
>
> --
> ----------------------------------------------------------------------
> Marcus Börger - Looking for all sorts of freelance work - just ask...
>
> Did i help you? Consider a gift:
> http://www.amazon.de/exec/obidos/wishlist/ho722v0rg1u0
> ----------------------------------------------------------------------
>
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.