diff options
author | Kalle Sommer Nielsen <kalle@php.net> | 2010-08-17 12:49:19 +0000 |
---|---|---|
committer | Kalle Sommer Nielsen <kalle@php.net> | 2010-08-17 12:49:19 +0000 |
commit | 159cd6916dccf814cf3594f558b99f4800d78224 (patch) | |
tree | ae33e88365b14d8ffd818ac9b40540f827e715a2 /main | |
parent | a12f6d9312256a4e1dd4091099add8397fd01e12 (diff) | |
download | php-git-159cd6916dccf814cf3594f558b99f4800d78224.tar.gz |
Fixed compiler warnings in main/
Diffstat (limited to 'main')
-rw-r--r-- | main/SAPI.c | 1 | ||||
-rw-r--r-- | main/main.c | 2 | ||||
-rw-r--r-- | main/rfc1867.c | 6 | ||||
-rw-r--r-- | main/snprintf.c | 4 | ||||
-rwxr-xr-x | main/streams/glob_wrapper.c | 2 |
5 files changed, 7 insertions, 8 deletions
diff --git a/main/SAPI.c b/main/SAPI.c index 0dec78142e..2287a0e4e7 100644 --- a/main/SAPI.c +++ b/main/SAPI.c @@ -570,7 +570,6 @@ static void sapi_header_add_op(sapi_header_op_enum op, sapi_header_struct *sapi_ SAPI_API int sapi_header_op(sapi_header_op_enum op, void *arg TSRMLS_DC) { - int retval; sapi_header_struct sapi_header; char *colon_offset; long myuid = 0L; diff --git a/main/main.c b/main/main.c index a8ba724e94..9d8a5f2f2f 100644 --- a/main/main.c +++ b/main/main.c @@ -1621,7 +1621,7 @@ void php_request_shutdown(void *dummy) zend_bool send_buffer = SG(request_info).headers_only ? 0 : 1; if (CG(unclean_shutdown) && PG(last_error_type) == E_ERROR && - PG(memory_limit) < zend_memory_usage(1 TSRMLS_CC) + (size_t)PG(memory_limit) < zend_memory_usage(1 TSRMLS_CC) ) { send_buffer = 0; } diff --git a/main/rfc1867.c b/main/rfc1867.c index c9f5bdb495..e77093c344 100644 --- a/main/rfc1867.c +++ b/main/rfc1867.c @@ -769,7 +769,7 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */ int fd = -1; zend_llist header; void *event_extra_data = NULL; - int llen = 0; + unsigned int llen = 0; int upload_cnt = INI_INT("max_file_uploads"); if (SG(post_max_size) > 0 && SG(request_info).content_length > SG(post_max_size)) { @@ -1066,12 +1066,12 @@ SAPI_API SAPI_POST_HANDLER_FUNC(rfc1867_post_handler) /* {{{ */ } } - if (PG(upload_max_filesize) > 0 && (total_bytes+blen) > PG(upload_max_filesize)) { + if (PG(upload_max_filesize) > 0 && (long)(total_bytes+blen) > PG(upload_max_filesize)) { #if DEBUG_FILE_UPLOAD sapi_module.sapi_error(E_NOTICE, "upload_max_filesize of %ld bytes exceeded - file [%s=%s] not saved", PG(upload_max_filesize), param, filename); #endif cancel_upload = UPLOAD_ERROR_A; - } else if (max_file_size && ((total_bytes+blen) > max_file_size)) { + } else if (max_file_size && ((long)(total_bytes+blen) > max_file_size)) { #if DEBUG_FILE_UPLOAD sapi_module.sapi_error(E_NOTICE, "MAX_FILE_SIZE of %ld bytes exceeded - file [%s=%s] not saved", max_file_size, param, filename); #endif diff --git a/main/snprintf.c b/main/snprintf.c index f0b7caa3ec..f6490bc432 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -1220,7 +1220,7 @@ static void strx_printv(int *ccp, char *buf, size_t len, const char *format, va_ PHPAPI int ap_php_slprintf(char *buf, size_t len, const char *format,...) /* {{{ */ { - int cc; + unsigned int cc; va_list ap; va_start(ap, format); @@ -1236,7 +1236,7 @@ PHPAPI int ap_php_slprintf(char *buf, size_t len, const char *format,...) /* {{{ PHPAPI int ap_php_vslprintf(char *buf, size_t len, const char *format, va_list ap) /* {{{ */ { - int cc; + unsigned int cc; strx_printv(&cc, buf, len, format, ap); if (cc >= len) { diff --git a/main/streams/glob_wrapper.c b/main/streams/glob_wrapper.c index 0ff4f50e29..2a4fc5bd4e 100755 --- a/main/streams/glob_wrapper.c +++ b/main/streams/glob_wrapper.c @@ -144,7 +144,7 @@ static size_t php_glob_stream_read(php_stream *stream, char *buf, size_t count T /* avoid problems if someone mis-uses the stream */ if (count == sizeof(php_stream_dirent) && pglob) { - if (pglob->index < pglob->glob.gl_pathc) { + if (pglob->index < (size_t)pglob->glob.gl_pathc) { php_glob_stream_path_split(pglob, pglob->glob.gl_pathv[pglob->index++], pglob->flags & GLOB_APPEND, &path TSRMLS_CC); PHP_STRLCPY(ent->d_name, path, sizeof(ent->d_name), strlen(path)); return sizeof(php_stream_dirent); |