]> granicus.if.org Git - php/commitdiff
Reduced compiler warnings in ZE2 build
authorMoriyoshi Koizumi <moriyoshi@php.net>
Sat, 11 Jan 2003 22:17:37 +0000 (22:17 +0000)
committerMoriyoshi Koizumi <moriyoshi@php.net>
Sat, 11 Jan 2003 22:17:37 +0000 (22:17 +0000)
ext/standard/file.c
ext/standard/formatted_print.c

index d6fc9d954372d380cd8b19cfa30a6525969c710f..38fdec6413d24da5d2d6e960cc801d752ebe9378 100644 (file)
@@ -1376,7 +1376,7 @@ PHPAPI PHP_FUNCTION(fgets)
                ZVAL_STRINGL(return_value, buf, line_len, 0);
                /* resize buffer if it's much larger than the result.
                 * Only needed if the user requested a buffer size. */
-               if (argc > 1 && Z_STRLEN_P(return_value) < len / 2) {
+               if (argc > 1 && (int)Z_STRLEN_P(return_value) < len / 2) {
                        Z_STRVAL_P(return_value) = erealloc(buf, line_len + 1);
                }
        }
@@ -1559,7 +1559,7 @@ PHPAPI PHP_FUNCTION(fwrite)
                }
                convert_to_string_ex(arg2);
                convert_to_long_ex(arg3);
-               num_bytes = MIN(Z_LVAL_PP(arg3), Z_STRLEN_PP(arg2));
+               num_bytes = MIN(Z_LVAL_PP(arg3), (int)Z_STRLEN_PP(arg2));
                break;
        default:
                WRONG_PARAM_COUNT;
index d5bd95c4b79d93416b016092d4b1112c35820392..47cc4716087ecce5c3ec8ab8edd875c6518fa5b5 100644 (file)
@@ -504,7 +504,7 @@ php_formatted_print(int ht, int *len, int use_array, int format_offset TSRMLS_DC
 
        currarg = 1;
 
-       while (inpos<Z_STRLEN_PP(args[format_offset])) {
+       while (inpos < (int)Z_STRLEN_PP(args[format_offset])) {
                int expprec = 0;
 
                PRINTF_DEBUG(("sprintf: format[%d]='%c'\n", inpos, format[inpos]));