diff options
-rw-r--r-- | ext/standard/exec.c | 2 | ||||
-rw-r--r-- | ext/standard/filters.c | 6 | ||||
-rw-r--r-- | ext/standard/fsock.c | 2 | ||||
-rw-r--r-- | ext/standard/ftp_fopen_wrapper.c | 2 | ||||
-rw-r--r-- | ext/standard/http_fopen_wrapper.c | 2 | ||||
-rw-r--r-- | ext/standard/var.c | 2 |
6 files changed, 10 insertions, 6 deletions
diff --git a/ext/standard/exec.c b/ext/standard/exec.c index 671f6ffd14..2b3f3b3dd8 100644 --- a/ext/standard/exec.c +++ b/ext/standard/exec.c @@ -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) = ' '; } diff --git a/ext/standard/filters.c b/ext/standard/filters.c index 570e808bdc..1e64cc19a1 100644 --- a/ext/standard/filters.c +++ b/ext/standard/filters.c @@ -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); diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c index b59e9db8c2..4932965383 100644 --- a/ext/standard/fsock.c +++ b/ext/standard/fsock.c @@ -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; diff --git a/ext/standard/ftp_fopen_wrapper.c b/ext/standard/ftp_fopen_wrapper.c index 0edcd28a1c..177bed26ab 100644 --- a/ext/standard/ftp_fopen_wrapper.c +++ b/ext/standard/ftp_fopen_wrapper.c @@ -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) { diff --git a/ext/standard/http_fopen_wrapper.c b/ext/standard/http_fopen_wrapper.c index 039f6db93c..538656db9f 100644 --- a/ext/standard/http_fopen_wrapper.c +++ b/ext/standard/http_fopen_wrapper.c @@ -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; diff --git a/ext/standard/var.c b/ext/standard/var.c index a2fcdb4755..b1732e4805 100644 --- a/ext/standard/var.c +++ b/ext/standard/var.c @@ -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; |