]> granicus.if.org Git - php/commitdiff
kill warnings
authorSascha Schumann <sas@php.net>
Thu, 28 Aug 2003 16:28:33 +0000 (16:28 +0000)
committerSascha Schumann <sas@php.net>
Thu, 28 Aug 2003 16:28:33 +0000 (16:28 +0000)
ext/standard/exec.c
ext/standard/filters.c
ext/standard/fsock.c
ext/standard/ftp_fopen_wrapper.c
ext/standard/http_fopen_wrapper.c
ext/standard/var.c

index 671f6ffd14be7a86421772fec366bdf34661a64a..2b3f3b3dd88bcd68a61e4985f73fd3eb74dea9f2 100644 (file)
@@ -79,7 +79,7 @@ int php_exec(int type, char *cmd, pval *array, pval *return_value TSRMLS_DC)
                        goto err;
                }
                b = strrchr(cmd, PHP_DIR_SEPARATOR);
-               spprintf(&d, 0, "%s%s%s%s", PG(safe_mode_exec_dir), (b ? "" : "/"), (b ? b : cmd), (c ? " " : ""), (c ? c : ""));
+               spprintf(&d, 0, "%s%s%s%s%s", PG(safe_mode_exec_dir), (b ? "" : "/"), (b ? b : cmd), (c ? " " : ""), (c ? c : ""));
                if (c) {
                        *(c - 1) = ' ';
                }
index 570e808bdca18f7ae4320f98c3413016cb5d809e..1e64cc19a1285aa7a09c7eee117173dccbd24cca 100644 (file)
@@ -1181,6 +1181,7 @@ static php_conv_err_t php_conv_get_string_prop_ex(const HashTable *ht, char **pr
        return PHP_CONV_ERR_SUCCESS;
 }
 
+#if IT_WAS_USED
 static php_conv_err_t php_conv_get_long_prop_ex(const HashTable *ht, long *pretval, char *field_name, size_t field_name_len)
 {
        zval **tmpval;
@@ -1202,6 +1203,7 @@ static php_conv_err_t php_conv_get_long_prop_ex(const HashTable *ht, long *pretv
        } 
        return PHP_CONV_ERR_SUCCESS;
 }
+#endif
 
 static php_conv_err_t php_conv_get_ulong_prop_ex(const HashTable *ht, unsigned long *pretval, char *field_name, size_t field_name_len)
 {
@@ -1252,6 +1254,7 @@ static php_conv_err_t php_conv_get_bool_prop_ex(const HashTable *ht, int *pretva
 }
 
 
+#if IT_WAS_USED
 static int php_conv_get_int_prop_ex(const HashTable *ht, int *pretval, char *field_name, size_t field_name_len)
 {
        long l;
@@ -1264,6 +1267,7 @@ static int php_conv_get_int_prop_ex(const HashTable *ht, int *pretval, char *fie
        }
        return err;
 }
+#endif
 
 static int php_conv_get_uint_prop_ex(const HashTable *ht, unsigned int *pretval, char *field_name, size_t field_name_len)
 {
@@ -1661,7 +1665,7 @@ static php_stream_filter *strfilter_convert_create(const char *filtername, zval
        php_stream_filter *retval = NULL;
 
        char *dot;
-       int conv_mode;
+       int conv_mode = 0;
 
        if (filterparams != NULL && Z_TYPE_P(filterparams) != IS_ARRAY) {
                php_error_docref(NULL TSRMLS_CC, E_WARNING, "stream filter (%s): invalid filter parameter", filtername);
index b59e9db8c2435d7edced064cd58632c0e0b6ad85..493296538346eee0f44af5d5f2bcefdf0530af98 100644 (file)
@@ -56,7 +56,7 @@ static void php_fsockopen_stream(INTERNAL_FUNCTION_PARAMETERS, int persistent)
        }
 
        if (port > 0) {
-               hostname_len = spprintf(&hostname, 0, "%s:%d", host, port);
+               hostname_len = spprintf(&hostname, 0, "%s:%ld", host, port);
        } else {
                hostname_len = host_len;
                hostname = host;
index 0edcd28a1c72b3f4e2fd8dc29c9c74e62db25231..177bed26ab649bdad3aa1c2c9c1ef62da3b32737 100644 (file)
@@ -477,7 +477,7 @@ php_stream * php_stream_url_wrap_ftp(php_stream_wrapper *wrapper, char *path, ch
                        php_stream_context_get_option(context, "ftp", "resume_pos", &tmpzval) == SUCCESS &&
                        Z_TYPE_PP(tmpzval) == IS_LONG &&
                        Z_LVAL_PP(tmpzval) > 0) {
-                       snprintf(tmp_line, 511, "REST %u\r\n", Z_LVAL_PP(tmpzval));
+                       snprintf(tmp_line, 511, "REST %ld\r\n", Z_LVAL_PP(tmpzval));
                        php_stream_write_string(stream, tmp_line);
                        result = GET_FTP_RESULT(stream);
                        if (result < 300 || result > 399) {                     
index 039f6db93c45eaf132504765e8ced55abab4018a..538656db9f2fb6aa36020a677be1c8f5f55721b1 100644 (file)
@@ -103,7 +103,7 @@ php_stream *php_stream_url_wrap_http_ex(php_stream_wrapper *wrapper, char *path,
        char *http_header_line = NULL;
        char tmp_line[128];
        size_t chunk_size = 0, file_size = 0;
-       int eol_detect;
+       int eol_detect = 0;
        char *transport_string, *errstr = NULL;
        int transport_len, have_header = 0;
 
index a2fcdb4755246fe4a7451e28e57c3ee066554ad9..b1732e480597d7a98d64e35f239c2b79d18f5f1e 100644 (file)
@@ -535,7 +535,7 @@ static void php_var_serialize_intern(smart_str *buf, zval **struc, HashTable *va
                                char *s;
                                ulong slen;
 
-                               slen = spprintf(&s, 0, "d:%.*G;", PG(serialize_precision), Z_DVAL_PP(struc));
+                               slen = spprintf(&s, 0, "d:%.*G;", (int) PG(serialize_precision), Z_DVAL_PP(struc));
                                smart_str_appendl(buf, s, slen);
                                efree(s);
                                return;