helly Sun Feb 26 10:49:51 2006 UTC Modified files: (Branch: PHP_5_1) /php-src/sapi/cgi fastcgi.c /php-src/win32 select.c /php-src/ext/standard array.c dir.c exec.c pack.c reg.c string.c user_filters.c /php-src/main main.c /php-src/main/streams filter.c Log: - Warning fixes by Steph
http://cvs.php.net/viewcvs.cgi/php-src/sapi/cgi/fastcgi.c?r1=1.4.2.4&r2=1.4.2.5&diff_format=u Index: php-src/sapi/cgi/fastcgi.c diff -u php-src/sapi/cgi/fastcgi.c:1.4.2.4 php-src/sapi/cgi/fastcgi.c:1.4.2.5 --- php-src/sapi/cgi/fastcgi.c:1.4.2.4 Sat Feb 4 23:54:21 2006 +++ php-src/sapi/cgi/fastcgi.c Sun Feb 26 10:49:50 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: fastcgi.c,v 1.4.2.4 2006/02/04 23:54:21 fmk Exp $ */ +/* $Id: fastcgi.c,v 1.4.2.5 2006/02/26 10:49:50 helly Exp $ */ #include "fastcgi.h" #include "php.h" @@ -531,7 +531,7 @@ } len = p - buf - sizeof(fcgi_header); len += fcgi_make_header((fcgi_header*)buf, FCGI_GET_VALUES_RESULT, 0, len); - if (safe_write(req, buf, sizeof(fcgi_header)+len) != sizeof(fcgi_header)+len) { + if (safe_write(req, buf, sizeof(fcgi_header)+len) != (int)sizeof(fcgi_header)+len) { return 0; } return 0; http://cvs.php.net/viewcvs.cgi/php-src/win32/select.c?r1=1.10.2.1&r2=1.10.2.2&diff_format=u Index: php-src/win32/select.c diff -u php-src/win32/select.c:1.10.2.1 php-src/win32/select.c:1.10.2.2 --- php-src/win32/select.c:1.10.2.1 Sun Jan 1 12:50:20 2006 +++ php-src/win32/select.c Sun Feb 26 10:49:50 2006 @@ -21,7 +21,7 @@ #ifdef PHP_WIN32 -/* $Id: select.c,v 1.10.2.1 2006/01/01 12:50:20 sniper Exp $ */ +/* $Id: select.c,v 1.10.2.2 2006/02/26 10:49:50 helly Exp $ */ /* Win32 select() will only work with sockets, so we roll our own implementation here. * - If you supply only sockets, this simply passes through to winsock select(). @@ -67,13 +67,13 @@ if ((DWORD)handles[n_handles] == 0xffffffff) { /* socket */ if (SAFE_FD_ISSET(i, rfds)) { - FD_SET(i, &sock_read); + FD_SET((uint)i, &sock_read); } if (SAFE_FD_ISSET(i, wfds)) { - FD_SET(i, &sock_write); + FD_SET((uint)i, &sock_write); } if (SAFE_FD_ISSET(i, efds)) { - FD_SET(i, &sock_except); + FD_SET((uint)i, &sock_except); } if (i > sock_max_fd) { sock_max_fd = i; @@ -136,13 +136,13 @@ for (i = 0; i < n_handles; i++) { if (WAIT_OBJECT_0 == WaitForSingleObject(handles[i], 0)) { if (SAFE_FD_ISSET(handle_slot_to_fd[i], rfds)) { - FD_SET(handle_slot_to_fd[i], &aread); + FD_SET((uint)handle_slot_to_fd[i], &aread); } if (SAFE_FD_ISSET(handle_slot_to_fd[i], wfds)) { - FD_SET(handle_slot_to_fd[i], &awrite); + FD_SET((uint)handle_slot_to_fd[i], &awrite); } if (SAFE_FD_ISSET(handle_slot_to_fd[i], efds)) { - FD_SET(handle_slot_to_fd[i], &aexcept); + FD_SET((uint)handle_slot_to_fd[i], &aexcept); } retcode++; } http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/array.c?r1=1.308.2.17&r2=1.308.2.18&diff_format=u Index: php-src/ext/standard/array.c diff -u php-src/ext/standard/array.c:1.308.2.17 php-src/ext/standard/array.c:1.308.2.18 --- php-src/ext/standard/array.c:1.308.2.17 Tue Feb 7 17:54:24 2006 +++ php-src/ext/standard/array.c Sun Feb 26 10:49:50 2006 @@ -21,7 +21,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: array.c,v 1.308.2.17 2006/02/07 17:54:24 andrei Exp $ */ +/* $Id: array.c,v 1.308.2.18 2006/02/26 10:49:50 helly Exp $ */ #include "php.h" #include "php_ini.h" @@ -1810,14 +1810,14 @@ /* Clamp the offset.. */ if (offset > num_in) offset = num_in; - else if (offset < 0 && (offset=num_in+offset) < 0) + else if (offset < 0 && (offset = (num_in + offset)) < 0) offset = 0; /* ..and the length */ if (length < 0) { - length = num_in-offset+length; - } else if (((unsigned) offset + (unsigned) length) > num_in) { - length = num_in-offset; + length = num_in - offset + length; + } else if (((unsigned)offset + (unsigned)length) > (unsigned)num_in) { + length = num_in - offset; } /* Create and initialize output hash */ @@ -2204,14 +2204,14 @@ /* Clamp the offset.. */ if (offset_val > num_in) return; - else if (offset_val < 0 && (offset_val=num_in+offset_val) < 0) + else if (offset_val < 0 && (offset_val = (num_in + offset_val)) < 0) offset_val = 0; /* ..and the length */ if (length_val < 0) { - length_val = num_in-offset_val+length_val; - } else if (((unsigned) offset_val + (unsigned) length_val) > num_in) { - length_val = num_in-offset_val; + length_val = num_in - offset_val + length_val; + } else if (((unsigned)offset_val + (unsigned)length_val) > (unsigned)num_in) { + length_val = num_in - offset_val; } if (length_val == 0) http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/dir.c?r1=1.147.2.2&r2=1.147.2.3&diff_format=u Index: php-src/ext/standard/dir.c diff -u php-src/ext/standard/dir.c:1.147.2.2 php-src/ext/standard/dir.c:1.147.2.3 --- php-src/ext/standard/dir.c:1.147.2.2 Sun Jan 1 12:50:14 2006 +++ php-src/ext/standard/dir.c Sun Feb 26 10:49:50 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: dir.c,v 1.147.2.2 2006/01/01 12:50:14 sniper Exp $ */ +/* $Id: dir.c,v 1.147.2.3 2006/02/26 10:49:50 helly Exp $ */ /* {{{ includes/startup/misc */ @@ -370,7 +370,7 @@ int pattern_len; long flags = 0; glob_t globbuf; - unsigned int n; + int n; int ret; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &pattern, &pattern_len, &flags) == FAILURE) http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/exec.c?r1=1.113.2.2&r2=1.113.2.3&diff_format=u Index: php-src/ext/standard/exec.c diff -u php-src/ext/standard/exec.c:1.113.2.2 php-src/ext/standard/exec.c:1.113.2.3 --- php-src/ext/standard/exec.c:1.113.2.2 Sun Jan 1 12:50:14 2006 +++ php-src/ext/standard/exec.c Sun Feb 26 10:49:50 2006 @@ -16,7 +16,7 @@ | Ilia Alshanetsky <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: exec.c,v 1.113.2.2 2006/01/01 12:50:14 sniper Exp $ */ +/* $Id: exec.c,v 1.113.2.3 2006/02/26 10:49:50 helly Exp $ */ #include <stdio.h> #include "php.h" @@ -135,7 +135,7 @@ /* strip trailing whitespaces */ l = bufl; while (l-- && isspace(((unsigned char *)buf)[l])); - if (l != (bufl - 1)) { + if (l != (int)(bufl - 1)) { bufl = l + 1; buf[bufl] = '\0'; } @@ -148,7 +148,7 @@ if (type != 2) { l = bufl; while (l-- && isspace(((unsigned char *)buf)[l])); - if (l != (bufl - 1)) { + if (l != (int)(bufl - 1)) { bufl = l + 1; buf[bufl] = '\0'; } http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/pack.c?r1=1.57.2.4&r2=1.57.2.5&diff_format=u Index: php-src/ext/standard/pack.c diff -u php-src/ext/standard/pack.c:1.57.2.4 php-src/ext/standard/pack.c:1.57.2.5 --- php-src/ext/standard/pack.c:1.57.2.4 Thu Jan 26 15:45:33 2006 +++ php-src/ext/standard/pack.c Sun Feb 26 10:49:50 2006 @@ -15,7 +15,7 @@ | Author: Chris Schneider <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: pack.c,v 1.57.2.4 2006/01/26 15:45:33 iliaa Exp $ */ +/* $Id: pack.c,v 1.57.2.5 2006/02/26 10:49:50 helly Exp $ */ #include "php.h" @@ -55,7 +55,7 @@ #endif #define INC_OUTPUTPOS(a,b) \ - if ((a) < 0 || ((INT_MAX - outputpos)/(b)) < (a)) { \ + if ((a) < 0 || ((INT_MAX - outputpos)/((int)b)) < (a)) { \ php_error_docref(NULL TSRMLS_CC, E_WARNING, "Type %c: integer overflow in format string", code); \ RETURN_FALSE; \ } \ http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/reg.c?r1=1.82.2.2&r2=1.82.2.3&diff_format=u Index: php-src/ext/standard/reg.c diff -u php-src/ext/standard/reg.c:1.82.2.2 php-src/ext/standard/reg.c:1.82.2.3 --- php-src/ext/standard/reg.c:1.82.2.2 Sun Jan 1 12:50:15 2006 +++ php-src/ext/standard/reg.c Sun Feb 26 10:49:50 2006 @@ -17,7 +17,7 @@ | Jaakko Hyvätti <[EMAIL PROTECTED]> | +----------------------------------------------------------------------+ */ -/* $Id: reg.c,v 1.82.2.2 2006/01/01 12:50:15 sniper Exp $ */ +/* $Id: reg.c,v 1.82.2.3 2006/02/26 10:49:50 helly Exp $ */ #include <stdio.h> #include <ctype.h> @@ -355,7 +355,7 @@ new_l = strlen(buf) + subs[0].rm_so; /* part before the match */ walk = replace; while (*walk) { - if ('\\' == *walk && isdigit((unsigned char)walk[1]) && ((unsigned char)walk[1]) - '0' <= re.re_nsub) { + if ('\\' == *walk && isdigit((unsigned char)walk[1]) && ((unsigned char)walk[1]) - '0' <= (int)re.re_nsub) { if (subs[walk[1] - '0'].rm_so > -1 && subs[walk[1] - '0'].rm_eo > -1) { new_l += subs[walk[1] - '0'].rm_eo - subs[walk[1] - '0'].rm_so; } http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/string.c?r1=1.445.2.8&r2=1.445.2.9&diff_format=u Index: php-src/ext/standard/string.c diff -u php-src/ext/standard/string.c:1.445.2.8 php-src/ext/standard/string.c:1.445.2.9 --- php-src/ext/standard/string.c:1.445.2.8 Sun Jan 29 17:54:45 2006 +++ php-src/ext/standard/string.c Sun Feb 26 10:49:50 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: string.c,v 1.445.2.8 2006/01/29 17:54:45 sniper Exp $ */ +/* $Id: string.c,v 1.445.2.9 2006/02/26 10:49:50 helly Exp $ */ /* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */ @@ -237,7 +237,7 @@ } } - if (((unsigned) start + (unsigned) len) > len1) { + if ((start + len) > len1) { len = len1 - start; } @@ -1166,7 +1166,7 @@ if (state == 1) { cend = c; } - if (suffix != NULL && sufflen < (cend - comp) && + if (suffix != NULL && sufflen < (uint)(cend - comp) && memcmp(cend - sufflen, suffix, sufflen) == 0) { cend -= sufflen; } @@ -1983,7 +1983,7 @@ RETURN_FALSE; } - if (((unsigned) f + (unsigned) l) > Z_STRLEN_PP(str)) { + if ((f + l) > Z_STRLEN_PP(str)) { l = Z_STRLEN_PP(str) - f; } @@ -2080,7 +2080,7 @@ } } - if (((unsigned) f + (unsigned) l) > Z_STRLEN_PP(str)) { + if ((f + l) > Z_STRLEN_PP(str)) { l = Z_STRLEN_PP(str) - f; } if (Z_TYPE_PP(repl) == IS_ARRAY) { @@ -2176,7 +2176,7 @@ } } - if (((unsigned) f + (unsigned) l) > Z_STRLEN_PP(tmp_str)) { + if ((f + l) > Z_STRLEN_PP(tmp_str)) { l = Z_STRLEN_PP(tmp_str) - f; } http://cvs.php.net/viewcvs.cgi/php-src/ext/standard/user_filters.c?r1=1.31.2.1&r2=1.31.2.2&diff_format=u Index: php-src/ext/standard/user_filters.c diff -u php-src/ext/standard/user_filters.c:1.31.2.1 php-src/ext/standard/user_filters.c:1.31.2.2 --- php-src/ext/standard/user_filters.c:1.31.2.1 Sun Jan 1 12:50:15 2006 +++ php-src/ext/standard/user_filters.c Sun Feb 26 10:49:51 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: user_filters.c,v 1.31.2.1 2006/01/01 12:50:15 sniper Exp $ */ +/* $Id: user_filters.c,v 1.31.2.2 2006/02/26 10:49:51 helly Exp $ */ #include "php.h" #include "php_globals.h" @@ -406,7 +406,7 @@ if (!bucket->own_buf) { bucket = php_stream_bucket_make_writeable(bucket TSRMLS_CC); } - if (bucket->buflen != Z_STRLEN_PP(pzdata)) { + if ((int)bucket->buflen != Z_STRLEN_PP(pzdata)) { bucket->buf = perealloc(bucket->buf, Z_STRLEN_PP(pzdata), bucket->is_persistent); bucket->buflen = Z_STRLEN_PP(pzdata); } http://cvs.php.net/viewcvs.cgi/php-src/main/main.c?r1=1.640.2.15&r2=1.640.2.16&diff_format=u Index: php-src/main/main.c diff -u php-src/main/main.c:1.640.2.15 php-src/main/main.c:1.640.2.16 --- php-src/main/main.c:1.640.2.15 Fri Feb 3 09:31:59 2006 +++ php-src/main/main.c Sun Feb 26 10:49:51 2006 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: main.c,v 1.640.2.15 2006/02/03 09:31:59 dmitry Exp $ */ +/* $Id: main.c,v 1.640.2.16 2006/02/26 10:49:51 helly Exp $ */ /* {{{ includes */ @@ -659,7 +659,7 @@ * be NULL if PG(last_error_message) is not NULL */ if (strcmp(PG(last_error_message), buffer) || (!PG(ignore_repeated_source) - && ((PG(last_error_lineno) != error_lineno) + && ((PG(last_error_lineno) != (int)error_lineno) || strcmp(PG(last_error_file), error_filename)))) { display = 1; } else { http://cvs.php.net/viewcvs.cgi/php-src/main/streams/filter.c?r1=1.17.2.2&r2=1.17.2.3&diff_format=u Index: php-src/main/streams/filter.c diff -u php-src/main/streams/filter.c:1.17.2.2 php-src/main/streams/filter.c:1.17.2.3 --- php-src/main/streams/filter.c:1.17.2.2 Tue Jan 10 16:14:16 2006 +++ php-src/main/streams/filter.c Sun Feb 26 10:49:51 2006 @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: filter.c,v 1.17.2.2 2006/01/10 16:14:16 iliaa Exp $ */ +/* $Id: filter.c,v 1.17.2.3 2006/02/26 10:49:51 helly Exp $ */ #include "php.h" #include "php_globals.h" @@ -351,7 +351,7 @@ php_stream_bucket_append(brig_inp, bucket TSRMLS_CC); status = filter->fops->filter(stream, filter, brig_inp, brig_outp, &consumed, PSFS_FLAG_NORMAL TSRMLS_CC); - if (stream->readpos + consumed > stream->writepos || consumed < 0) { + if (stream->readpos + consumed > (uint)stream->writepos || consumed < 0) { /* No behaving filter should cause this. */ status = PSFS_ERR_FATAL; }
-- PHP CVS Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php