]> granicus.if.org Git - php/commitdiff
nuke remaining warnings
authorDaniel Beulshausen <dbeu@php.net>
Thu, 1 Nov 2001 20:10:17 +0000 (20:10 +0000)
committerDaniel Beulshausen <dbeu@php.net>
Thu, 1 Nov 2001 20:10:17 +0000 (20:10 +0000)
ext/sockets/php_sockets_win.c
ext/sockets/php_sockets_win.h
ext/sockets/sockets.c

index f352ac4b5c97adcd3d341fa66fd126cd07415d3f..58ba1c6c235d13a8514f04ca92487c287a3af961 100644 (file)
@@ -52,7 +52,7 @@ ssize_t readv(SOCKET sock, const struct iovec *iov, int iovcnt) {
        remain = bytes = (size_t) retval;
        
        for(i=0; i<iovcnt; i++) {
-               len = (iov[i].iov_len < remain) ? iov[i].iov_len : remain;
+               len = ((unsigned int)iov[i].iov_len < remain) ? iov[i].iov_len : remain;
                memcpy(iov[i].iov_base, buffer+pos, len);
                pos += len;
                remain -= len;
index 0d855c7e5d74b5e7a0ab57845666c9255cafeccf..5f725764f738df62c2747faa04205143319bdcbd 100644 (file)
@@ -42,7 +42,7 @@
 #define close(a) closesocket(a)
 #define CMSG_DATA(cmsg) ((cmsg)->cmsg_data)
 
-typedef long ssize_t;
+typedef int ssize_t;
 
 struct sockaddr_un {
        short   sun_family;
index e74c52aae24019f2b3385ed20b64ca3e7d2ea0af..5e685aa6f4a21737b29976ea53434a5bc76c7f4b 100644 (file)
@@ -1103,9 +1103,9 @@ PHP_FUNCTION(socket_iovec_alloc)
    Returns the data held in the iovec specified by iovec_id[iovec_position] */
 PHP_FUNCTION(socket_iovec_fetch)
 {
-       zval            *iovec_id;
-       php_iovec_t     *vector;
-       int                     iovec_position;
+       zval                    *iovec_id;
+       php_iovec_t             *vector;
+       unsigned int    iovec_position;
        
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &iovec_id, &iovec_position) == FAILURE)
                return;
@@ -1125,10 +1125,11 @@ PHP_FUNCTION(socket_iovec_fetch)
    Sets the data held in iovec_id[iovec_position] to new_val */
 PHP_FUNCTION(socket_iovec_set)
 {
-       zval            *iovec_id;
-       php_iovec_t     *vector;
-       int                     iovec_position, new_val_len;
-       char            *new_val;
+       zval                    *iovec_id;
+       php_iovec_t             *vector;
+       int                             new_val_len;
+       unsigned int    iovec_position;
+       char                    *new_val;
        
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rls", &iovec_id, &iovec_position, &new_val, &new_val_len) == FAILURE)
                return;
@@ -1186,7 +1187,7 @@ PHP_FUNCTION(socket_iovec_delete)
        zval                    *iovec_id;
        php_iovec_t             *vector;
        struct iovec    *vector_array;
-       int                             i, iov_pos;
+       unsigned int    i, iov_pos;
        
        if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "rl", &iovec_id, &iov_pos) == FAILURE)
                return;