]> granicus.if.org Git - php/commitdiff
Fix a couple of build warnings
authorRasmus Lerdorf <rasmus@php.net>
Mon, 16 Jul 2001 04:31:13 +0000 (04:31 +0000)
committerRasmus Lerdorf <rasmus@php.net>
Mon, 16 Jul 2001 04:31:13 +0000 (04:31 +0000)
ext/sockets/sockets.c
main/safe_mode.c

index b56db87d422e3329d897cf540df2a07b40700da8..c1f35efa570a3712415d98ebf75a84659556d2e9 100644 (file)
@@ -1016,7 +1016,6 @@ PHP_FUNCTION(socket_bind)
        long retval;
        php_sockaddr_storage sa_storage;
        struct sockaddr *sock_type = (struct sockaddr*) &sa_storage;
-       socklen_t length = sizeof(sa_storage);
        php_socket *php_sock;
        int argc = ZEND_NUM_ARGS();
 
@@ -1782,7 +1781,6 @@ PHP_FUNCTION(socket_getopt)
        convert_to_long_ex(arg3);
        
        if (Z_LVAL_PP(arg2) == SO_LINGER) {
-               zval *optval_array = NULL;
                optlen = sizeof(struct linger);
 
                if (getsockopt(php_sock->socket, Z_LVAL_PP(arg2), Z_LVAL_PP(arg3), (char*)&linger_val, &optlen) != 0) {
index f20fe516c4b6ecf9279292f833510ec4cd2a555a..c21e082468225de84d41bd431f0b64e37404451c 100644 (file)
@@ -97,7 +97,7 @@ PHPAPI int php_checkuid(const char *filename, char *fopen_mode, int mode)
                }
 
                /* Trim off filename */
-               if (s = strrchr(path,DEFAULT_SLASH)) {
+               if ((s = strrchr(path,DEFAULT_SLASH))) {
                        *s = '\0';
                }
        } else { /* CHECKUID_ALLOW_ONLY_DIR */