main/network.c

From: Date: Sat, 01 Mar 2003 15:51:50 +0000
Subject: main/network.c
Groups: php.dev 
Request: Send a blank email to php-dev+get-94708@lists.php.net to get a copy of this message
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 ----------------------------------------------------------------------

« previous php.dev (#94708) next »