From a788378ce2b1dd7ac1fad31282b20f1357f0a76f Mon Sep 17 00:00:00 2001 From: Ilia Alshanetsky Date: Thu, 5 Jun 2003 23:48:17 +0000 Subject: [PATCH] Fix compile warnings (mostly MFH from 5.0 branch) --- ext/hyperwave/hg_comm.c | 15 +++++---------- ext/pcntl/pcntl.c | 3 +++ ext/pcntl/php_pcntl.h | 4 ---- ext/sockets/php_sockets.h | 6 ------ ext/sockets/sockets.c | 1 + 5 files changed, 9 insertions(+), 20 deletions(-) diff --git a/ext/hyperwave/hg_comm.c b/ext/hyperwave/hg_comm.c index fb5517c14f..5aaae3dcfd 100644 --- a/ext/hyperwave/hg_comm.c +++ b/ext/hyperwave/hg_comm.c @@ -31,7 +31,7 @@ #include #include #ifdef PHP_WIN32 -# include +# include # define EWOULDBLOCK WSAEWOULDBLOCK # define ETIMEDOUT WSAETIMEDOUT # define bcopy memcpy @@ -42,6 +42,7 @@ # include # include # include +# include #endif #include #include @@ -5034,10 +5035,8 @@ int send_pipedocument(int sockfd, char *host, hw_objectID objectID, int mode, in switch(hostptr->h_addrtype) { struct in_addr *ptr1; - char *ptr; case AF_INET: - ptr = hostptr->h_addr_list[0]; - ptr1 = (struct in_addr *) ptr; + ptr1 = (struct in_addr *) hostptr->h_addr_list[0]; hostip = inet_ntoa(*ptr1); break; default: @@ -5221,10 +5220,8 @@ int send_pipecgi(int sockfd, char *host, hw_objectID objectID, char *cgi_env_str switch(hostptr->h_addrtype) { struct in_addr *ptr1; - char *ptr; case AF_INET: - ptr = hostptr->h_addr_list[0]; - ptr1 = (struct in_addr *) ptr; + ptr1 = (struct in_addr *) hostptr->h_addr_list[0]; hostip = inet_ntoa(*ptr1); break; default: @@ -5403,10 +5400,8 @@ int send_putdocument(int sockfd, char *host, hw_objectID parentID, char *objectR switch(hostptr->h_addrtype) { struct in_addr *ptr1; - char *ptr; case AF_INET: - ptr = hostptr->h_addr_list[0]; - ptr1 = (struct in_addr *) ptr; + ptr1 = (struct in_addr *) hostptr->h_addr_list[0]; hostip = inet_ntoa(*ptr1); break; default: diff --git a/ext/pcntl/pcntl.c b/ext/pcntl/pcntl.c index d9f5e6564e..62639987eb 100755 --- a/ext/pcntl/pcntl.c +++ b/ext/pcntl/pcntl.c @@ -69,6 +69,9 @@ zend_module_entry pcntl_module_entry = { #ifdef COMPILE_DL_PCNTL ZEND_GET_MODULE(pcntl) #endif + +static void pcntl_signal_handler(int); +static void pcntl_tick_handler(); void php_register_signal_constants(INIT_FUNC_ARGS) { diff --git a/ext/pcntl/php_pcntl.h b/ext/pcntl/php_pcntl.h index ecbbd263d1..941bebb855 100644 --- a/ext/pcntl/php_pcntl.h +++ b/ext/pcntl/php_pcntl.h @@ -51,10 +51,6 @@ PHP_FUNCTION(pcntl_wstopsig); PHP_FUNCTION(pcntl_signal); PHP_FUNCTION(pcntl_exec); -static void pcntl_signal_handler(int); -static void pcntl_tick_handler(); - - ZEND_BEGIN_MODULE_GLOBALS(pcntl) HashTable php_signal_table; zend_llist php_signal_queue; diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h index fed1dda9a6..a6ff5c1108 100644 --- a/ext/sockets/php_sockets.h +++ b/ext/sockets/php_sockets.h @@ -101,12 +101,6 @@ typedef struct { zend_bool use_system_read; } php_sockets_globals; -/* Prototypes */ -static int php_open_listen_sock(php_socket **php_sock, int port, int backlog TSRMLS_DC); -static int php_accept_connect(php_socket *in_sock, php_socket **new_sock, struct sockaddr *la TSRMLS_DC); -static int php_read(int bsd_socket, void *buf, size_t maxlen, int flags); -static char *php_strerror(int error TSRMLS_DC); - ZEND_BEGIN_MODULE_GLOBALS(sockets) int last_error; char *strerror_buf; diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 26fec9780a..e88fcb61c8 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -82,6 +82,7 @@ ZEND_DECLARE_MODULE_GLOBALS(sockets) #define PF_INET AF_INET #endif +static char *php_strerror(int error TSRMLS_DC); #define PHP_NORMAL_READ 0x0001 #define PHP_BINARY_READ 0x0002 -- 2.40.0