Fixed compilation warnings

This commit is contained in:
Dmitry Stogov 2016-06-22 00:40:50 +03:00
parent 4ccbe03e44
commit 323b2733f6
87 changed files with 848 additions and 807 deletions

View File

@ -323,7 +323,8 @@ static php_stream_wrapper_ops bzip2_stream_wops = {
NULL, /* unlink */
NULL, /* rename */
NULL, /* mkdir */
NULL /* rmdir */
NULL, /* rmdir */
NULL
};
static php_stream_wrapper php_stream_bzip2_wrapper = {

View File

@ -167,7 +167,7 @@ static void _php_curl_close(zend_resource *rsrc);
# define php_curl_ret(__ret) RETVAL_FALSE; return;
#endif
static int php_curl_option_str(php_curl *ch, zend_long option, const char *str, const int len, zend_bool make_copy)
static int php_curl_option_str(php_curl *ch, zend_long option, const char *str, const size_t len, zend_bool make_copy)
{
CURLcode error = CURLE_OK;
@ -196,7 +196,7 @@ static int php_curl_option_str(php_curl *ch, zend_long option, const char *str,
return error == CURLE_OK ? SUCCESS : FAILURE;
}
static int php_curl_option_url(php_curl *ch, const char *url, const int len) /* {{{ */
static int php_curl_option_url(php_curl *ch, const char *url, const size_t len) /* {{{ */
{
/* Disable file:// if open_basedir are used */
if (PG(open_basedir) && *PG(open_basedir)) {

View File

@ -1071,7 +1071,8 @@ char *php_date_short_day_name(timelib_sll y, timelib_sll m, timelib_sll d)
static zend_string *date_format(char *format, size_t format_len, timelib_time *t, int localtime)
{
smart_str string = {0};
int i, length = 0;
size_t i;
int length = 0;
char buffer[97];
timelib_time_offset *offset = NULL;
timelib_sll isoweek, isoyear;
@ -4217,7 +4218,8 @@ PHP_FUNCTION(date_interval_create_from_date_string)
static zend_string *date_interval_format(char *format, size_t format_len, timelib_rel_time *t)
{
smart_str string = {0};
int i, length, have_format_spec = 0;
size_t i;
int length, have_format_spec = 0;
char buffer[33];
if (!format_len) {

View File

@ -363,7 +363,7 @@ static dba_handler handler[] = {
#if DBA_TCADB
DBA_HND(tcadb, DBA_LOCK_ALL)
#endif
{ NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
{ NULL, 0, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL }
};
#if DBA_FLATFILE

View File

@ -43,7 +43,7 @@ ZEND_END_ARG_INFO();
const zend_function_entry php_dom_comment_class_functions[] = {
PHP_ME(domcomment, __construct, arginfo_dom_comment_construct, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
PHP_FE_END
};
/* {{{ proto void DOMComment::__construct([string value]); */

View File

@ -249,6 +249,7 @@ zend_object_iterator_funcs php_dom_iterator_funcs = {
php_dom_iterator_current_data,
php_dom_iterator_current_key,
php_dom_iterator_move_forward,
NULL,
NULL
};

View File

@ -42,7 +42,7 @@ ZEND_END_ARG_INFO();
const zend_function_entry php_dom_domimplementationlist_class_functions[] = {
PHP_FALIAS(item, dom_domimplementationlist_item, arginfo_dom_implementationlist_item)
{NULL, NULL, NULL}
PHP_FE_END
};
/* {{{ attribute protos, not implemented yet */

View File

@ -856,7 +856,7 @@ int dom_node_text_content_write(dom_object *obj, zval *newval)
str = zval_get_string(newval);
/* we have to use xmlNodeAddContent() to get the same behavior as with xmlNewText() */
xmlNodeSetContent(nodep, (xmlChar *) "");
xmlNodeAddContent(nodep, ZSTR_VAL(str));
xmlNodeAddContent(nodep, (xmlChar *) ZSTR_VAL(str));
zend_string_release(str);
return SUCCESS;

View File

@ -2703,7 +2703,8 @@ static int exif_process_unicode(image_info_type *ImageInfo, xp_field_type *xp_fi
* Process nested IFDs directories in Maker Note. */
static int exif_process_IFD_in_MAKERNOTE(image_info_type *ImageInfo, char * value_ptr, int value_len, char *offset_base, size_t IFDlength, size_t displacement)
{
int de, i=0, section_index = SECTION_MAKERNOTE;
size_t i;
int de, section_index = SECTION_MAKERNOTE;
int NumDirEntries, old_motorola_intel, offset_diff;
const maker_note_type *maker_note;
char *dir_start;
@ -3317,11 +3318,11 @@ static int exif_scan_JPEG_header(image_info_type *ImageInfo)
}
/* Read the length of the section. */
if ((lh = php_stream_getc(ImageInfo->infile)) == EOF) {
if ((lh = php_stream_getc(ImageInfo->infile)) == (unsigned int)EOF) {
EXIF_ERRLOG_CORRUPT(ImageInfo)
return FALSE;
}
if ((ll = php_stream_getc(ImageInfo->infile)) == EOF) {
if ((ll = php_stream_getc(ImageInfo->infile)) == (unsigned int)EOF) {
EXIF_ERRLOG_CORRUPT(ImageInfo)
return FALSE;
}

View File

@ -203,7 +203,7 @@ zend_function_entry fileinfo_functions[] = {
PHP_FE(finfo_file, arginfo_finfo_file)
PHP_FE(finfo_buffer, arginfo_finfo_buffer)
PHP_FE(mime_content_type, arginfo_mime_content_type)
{NULL, NULL, NULL}
PHP_FE_END
};
/* }}} */

View File

@ -517,7 +517,7 @@ void php_filter_validate_domain(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
void php_filter_validate_url(PHP_INPUT_FILTER_PARAM_DECL) /* {{{ */
{
php_url *url;
int old_len = (int)Z_STRLEN_P(value);
size_t old_len = Z_STRLEN_P(value);
php_filter_url(value, flags, option_array, charset);

View File

@ -111,7 +111,8 @@ static void php_filter_encode_url(zval *value, const unsigned char* chars, const
static void php_filter_strip(zval *value, zend_long flags)
{
unsigned char *str;
int i, c;
size_t i;
int c;
zend_string *buf;
/* Optimization for if no strip flags are set */
@ -158,7 +159,8 @@ static void filter_map_update(filter_map *map, int flag, const unsigned char *al
static void filter_map_apply(zval *value, filter_map *map)
{
unsigned char *str;
int i, c;
size_t i;
int c;
zend_string *buf;
str = (unsigned char *)Z_STRVAL_P(value);

View File

@ -866,7 +866,7 @@ ftp_get(ftpbuf_t *ftp, php_stream *outstream, const char *path, ftptype_t type,
}
while ((rcvd = my_recv(ftp, data->fd, data->buf, FTP_BUFSIZE))) {
if (rcvd == -1) {
if (rcvd == (size_t)-1) {
goto bail;
}
@ -1829,7 +1829,7 @@ ftp_genlist(ftpbuf_t *ftp, const char *cmd, const char *path)
lines = 0;
lastch = 0;
while ((rcvd = my_recv(ftp, data->fd, data->buf, FTP_BUFSIZE))) {
if (rcvd == -1 || rcvd > ((size_t)(-1))-size) {
if (rcvd == (size_t)-1 || rcvd > ((size_t)(-1))-size) {
goto bail;
}
@ -1958,7 +1958,7 @@ ftp_nb_continue_read(ftpbuf_t *ftp)
lastch = ftp->lastch;
if ((rcvd = my_recv(ftp, data->fd, data->buf, FTP_BUFSIZE))) {
if (rcvd == -1) {
if (rcvd == (size_t)-1) {
goto bail;
}

View File

@ -208,7 +208,7 @@ static inline void php_hash_string_xor(unsigned char *out, const unsigned char *
static inline void php_hash_hmac_prep_key(unsigned char *K, const php_hash_ops *ops, void *context, const unsigned char *key, const size_t key_len) {
memset(K, 0, ops->block_size);
if (key_len > ops->block_size) {
if (key_len > (size_t)ops->block_size) {
/* Reduce the key first */
ops->hash_init(context);
ops->hash_update(context, key, key_len);
@ -367,7 +367,7 @@ PHP_FUNCTION(hash_init)
memset(K, 0, ops->block_size);
if (key_len > ops->block_size) {
if (key_len > (size_t)ops->block_size) {
/* Reduce the key first */
ops->hash_update(context, (unsigned char *) key, key_len);
ops->hash_final((unsigned char *) K, context);
@ -729,7 +729,8 @@ PHP_FUNCTION(hash_equals)
{
zval *known_zval, *user_zval;
char *known_str, *user_str;
int result = 0, j;
int result = 0;
size_t j;
if (zend_parse_parameters(ZEND_NUM_ARGS(), "zz", &known_zval, &user_zval) == FAILURE) {
return;

View File

@ -153,9 +153,9 @@ static void PHP_SHA3_Init(PHP_SHA3_CTX* ctx,
static void PHP_SHA3_Update(PHP_SHA3_CTX* ctx,
const unsigned char* buf,
unsigned int count,
int block_size) {
size_t block_size) {
while (count > 0) {
int len = block_size - ctx->pos;
unsigned int len = block_size - ctx->pos;
if (len > count) len = count;
count -= len;
while (len-- > 0) {

View File

@ -70,7 +70,7 @@ static double collator_u_strtod(const UChar *nptr, UChar **endptr) /* {{{ */
if (any) {
char buf[64], *numbuf, *bufpos;
int length = u - nstart;
size_t length = u - nstart;
double value;
if (length < sizeof(buf)) {

View File

@ -370,7 +370,7 @@ PHP_FUNCTION( collator_sort_with_sort_keys )
char* sortKeyBuf = NULL; /* buffer to store sort keys */
uint32_t sortKeyBufSize = DEF_SORT_KEYS_BUF_SIZE; /* buffer size */
ptrdiff_t sortKeyBufOffset = 0; /* pos in buffer to store sort key */
int32_t sortKeyLen = 0; /* the length of currently processing key */
uint32_t sortKeyLen = 0; /* the length of currently processing key */
uint32_t bufLeft = 0;
uint32_t bufIncrement = 0;

View File

@ -997,7 +997,7 @@ static zend_function_entry php_converter_methods[] = {
PHP_ME(UConverter, getAvailable, php_converter_getavailable_arginfo, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
PHP_ME(UConverter, getAliases, php_converter_getaliases_arginfo, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
PHP_ME(UConverter, getStandards, php_converter_getstandards_arginfo, ZEND_ACC_PUBLIC | ZEND_ACC_STATIC)
{ NULL, NULL, NULL }
PHP_FE_END
};
/* {{{ Converter create/clone/destroy */

View File

@ -86,7 +86,7 @@ PHP_FUNCTION( datefmt_get_timetype )
PHP_FUNCTION( datefmt_get_pattern )
{
UChar value_buf[64];
int length = USIZE( value_buf );
uint32_t length = USIZE( value_buf );
UChar* value = value_buf;
zend_bool is_pattern_localized =FALSE;

View File

@ -130,7 +130,7 @@ PHP_FUNCTION(datefmt_parse)
char* text_to_parse = NULL;
size_t text_len =0;
zval* z_parse_pos = NULL;
int32_t parse_pos = -1;
zend_long parse_pos = -1;
DATE_FORMAT_METHOD_INIT_VARS;
@ -147,8 +147,8 @@ PHP_FUNCTION(datefmt_parse)
if (z_parse_pos) {
ZVAL_DEREF(z_parse_pos);
convert_to_long(z_parse_pos);
parse_pos = (int32_t)Z_LVAL_P(z_parse_pos);
if(parse_pos > text_len) {
parse_pos = Z_LVAL_P(z_parse_pos);
if((size_t)parse_pos > text_len) {
RETURN_FALSE;
}
}
@ -169,7 +169,7 @@ PHP_FUNCTION(datefmt_localtime)
char* text_to_parse = NULL;
size_t text_len =0;
zval* z_parse_pos = NULL;
int32_t parse_pos = -1;
zend_long parse_pos = -1;
DATE_FORMAT_METHOD_INIT_VARS;
@ -186,8 +186,8 @@ PHP_FUNCTION(datefmt_localtime)
if (z_parse_pos) {
ZVAL_DEREF(z_parse_pos);
convert_to_long(z_parse_pos);
parse_pos = (int32_t)Z_LVAL_P(z_parse_pos);
if(parse_pos > text_len) {
parse_pos = Z_LVAL_P(z_parse_pos);
if((size_t)parse_pos > text_len) {
RETURN_FALSE;
}
}

View File

@ -252,7 +252,7 @@ PHP_FUNCTION( numfmt_get_symbol )
zend_long symbol;
UChar value_buf[4];
UChar *value = value_buf;
int32_t length = USIZE(value_buf);
uint32_t length = USIZE(value_buf);
FORMATTER_METHOD_INIT_VARS;
/* Parse parameters. */
@ -345,7 +345,7 @@ PHP_FUNCTION( numfmt_set_symbol )
PHP_FUNCTION( numfmt_get_pattern )
{
UChar value_buf[64];
int32_t length = USIZE( value_buf );
uint32_t length = USIZE( value_buf );
UChar* value = value_buf;
FORMATTER_METHOD_INIT_VARS;

View File

@ -126,7 +126,7 @@ PHP_FUNCTION(grapheme_strpos)
/* we checked that it will fit: */
offset = (int32_t) loffset;
noffset = offset >= 0 ? offset : haystack_len + offset;
noffset = offset >= 0 ? offset : (int32_t)haystack_len + offset;
/* the offset is 'grapheme count offset' so it still might be invalid - we'll check it later */
@ -200,7 +200,7 @@ PHP_FUNCTION(grapheme_stripos)
is_ascii = ( grapheme_ascii_check((unsigned char*)haystack, haystack_len) >= 0 );
if ( is_ascii ) {
int32_t noffset = offset >= 0 ? offset : haystack_len + offset;
int32_t noffset = offset >= 0 ? offset : (int32_t)haystack_len + offset;
needle_dup = estrndup(needle, needle_len);
php_strtolower(needle_dup, needle_len);
haystack_dup = estrndup(haystack, haystack_len);
@ -828,7 +828,7 @@ PHP_FUNCTION(grapheme_extract)
RETURN_FALSE;
}
if ( lstart > INT32_MAX || lstart < 0 || lstart >= str_len ) {
if ( lstart > INT32_MAX || lstart < 0 || (size_t)lstart >= str_len ) {
intl_error_set( NULL, U_ILLEGAL_ARGUMENT_ERROR, "grapheme_extract: start not contained in string", 0 );
RETURN_FALSE;
}

View File

@ -345,7 +345,7 @@ grapheme_strrpos_ascii(char *haystack, size_t haystack_len, char *needle, size_t
e = haystack + haystack_len - needle_len;
} else {
p = haystack;
if (needle_len > -offset) {
if (needle_len > (size_t)-offset) {
e = haystack + haystack_len - needle_len;
} else {
e = haystack + haystack_len + offset;

View File

@ -34,8 +34,6 @@ int32_t grapheme_split_string(const UChar *text, int32_t text_length, int bounda
int32_t grapheme_count_graphemes(UBreakIterator *bi, UChar *string, int32_t string_len);
inline void *grapheme_memrchr_grapheme(const void *s, int c, int32_t n);
int32_t grapheme_get_haystack_offset(UBreakIterator* bi, int32_t offset);
UBreakIterator* grapheme_get_break_iterator(void *stack_buffer, UErrorCode *status );

View File

@ -1429,7 +1429,7 @@ static zend_string* lookup_loc_range(const char* loc_range, HashTable* hash_arr,
char* cur_loc_range = NULL;
zend_string* can_loc_range = NULL;
int saved_pos = 0;
size_t saved_pos = 0;
zend_string* return_value = NULL;

View File

@ -11,7 +11,7 @@ static inline int convert_cp(UChar32* pcp, zval *zcp) {
if (Z_TYPE_P(zcp) == IS_LONG) {
cp = Z_LVAL_P(zcp);
} else if (Z_TYPE_P(zcp) == IS_STRING) {
int i = 0;
size_t i = 0;
U8_NEXT(Z_STRVAL_P(zcp), i, Z_STRLEN_P(zcp), cp);
if (i != Z_STRLEN_P(zcp)) {
intl_error_set_code(NULL, U_ILLEGAL_ARGUMENT_ERROR);

View File

@ -139,8 +139,8 @@ int json_yydebug = 1;
/* In a future release of Bison, this section will be replaced
by #include "json_parser.tab.h". */
#ifndef YY_PHP_JSON_YY_HOME_JAKUB_PROG_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
# define YY_PHP_JSON_YY_HOME_JAKUB_PROG_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
#ifndef YY_PHP_JSON_YY_HOME_DMITRY_PHP_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
# define YY_PHP_JSON_YY_HOME_DMITRY_PHP_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@ -201,7 +201,7 @@ typedef union YYSTYPE YYSTYPE;
int php_json_yyparse (php_json_parser *parser);
#endif /* !YY_PHP_JSON_YY_HOME_JAKUB_PROG_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED */
#endif /* !YY_PHP_JSON_YY_HOME_DMITRY_PHP_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED */
/* Copy the second part of user declarations. */

View File

@ -30,8 +30,8 @@
This special exception was added by the Free Software Foundation in
version 2.2 of Bison. */
#ifndef YY_PHP_JSON_YY_HOME_JAKUB_PROG_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
# define YY_PHP_JSON_YY_HOME_JAKUB_PROG_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
#ifndef YY_PHP_JSON_YY_HOME_DMITRY_PHP_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
# define YY_PHP_JSON_YY_HOME_DMITRY_PHP_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED
/* Debug traces. */
#ifndef YYDEBUG
# define YYDEBUG 0
@ -92,4 +92,4 @@ typedef union YYSTYPE YYSTYPE;
int php_json_yyparse (php_json_parser *parser);
#endif /* !YY_PHP_JSON_YY_HOME_JAKUB_PROG_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED */
#endif /* !YY_PHP_JSON_YY_HOME_DMITRY_PHP_PHP_MASTER_EXT_JSON_JSON_PARSER_TAB_H_INCLUDED */

File diff suppressed because it is too large Load Diff

View File

@ -55,7 +55,7 @@ typedef struct _php_json_parser_methods {
struct _php_json_parser {
php_json_scanner scanner;
zval *return_value;
unsigned int depth;
int depth;
int max_depth;
php_json_parser_methods methods;
};

View File

@ -1,4 +1,4 @@
/* Generated by re2c 0.14.3 */
/* Generated by re2c 0.13.5 */
enum YYCONDTYPE {
yycJS,

View File

@ -1601,7 +1601,7 @@ PHP_FUNCTION(ldap_delete)
*/
static int _ldap_str_equal_to_const(const char *str, uint str_len, const char *cstr)
{
int i;
uint i;
if (strlen(cstr) != str_len)
return 0;
@ -1620,7 +1620,7 @@ static int _ldap_str_equal_to_const(const char *str, uint str_len, const char *c
*/
static int _ldap_strlen_max(const char *str, uint max_len)
{
int i;
uint i;
for (i = 0; i < max_len; ++i) {
if (str[i] == '\0') {
@ -1696,7 +1696,7 @@ PHP_FUNCTION(ldap_modify_batch)
zend_ulong tmpUlong;
/* make sure the DN contains no NUL bytes */
if (_ldap_strlen_max(dn, dn_len) != dn_len) {
if ((size_t)_ldap_strlen_max(dn, dn_len) != dn_len) {
php_error_docref(NULL, E_WARNING, "DN must not contain NUL bytes");
RETURN_FALSE;
}
@ -1755,7 +1755,7 @@ PHP_FUNCTION(ldap_modify_batch)
RETURN_FALSE;
}
if (Z_STRLEN_P(modinfo) != _ldap_strlen_max(Z_STRVAL_P(modinfo), Z_STRLEN_P(modinfo))) {
if (Z_STRLEN_P(modinfo) != (size_t)_ldap_strlen_max(Z_STRVAL_P(modinfo), Z_STRLEN_P(modinfo))) {
php_error_docref(NULL, E_WARNING, "A '" LDAP_MODIFY_BATCH_ATTRIB "' value must not contain NUL bytes");
RETURN_FALSE;
}
@ -2715,7 +2715,7 @@ PHP_FUNCTION(ldap_set_rebind_proc)
static zend_string* php_ldap_do_escape(const zend_bool *map, const char *value, size_t valuelen)
{
char hex[] = "0123456789abcdef";
int i, p = 0;
size_t i, p = 0;
size_t len = 0;
zend_string *ret;

View File

@ -687,8 +687,8 @@ static sapi_post_entry mbstr_post_entries[] = {
static int
php_mb_parse_encoding_list(const char *value, size_t value_length, const mbfl_encoding ***return_list, size_t *return_size, int persistent)
{
int size, bauto, ret = SUCCESS;
size_t n;
int bauto, ret = SUCCESS;
size_t n, size;
char *p, *p1, *p2, *endp, *tmpstr;
const mbfl_encoding **entry, **list;

View File

@ -748,7 +748,7 @@ static void _php_mb_regex_ereg_exec(INTERNAL_FUNCTION_PARAMETERS, int icase)
for (i = 0; i < regs->num_regs; i++) {
beg = regs->beg[i];
end = regs->end[i];
if (beg >= 0 && beg < end && end <= string_len) {
if (beg >= 0 && beg < end && (size_t)end <= string_len) {
add_index_stringl(array, i, (char *)&str[beg], end - beg);
} else {
add_index_bool(array, i, 0);
@ -807,7 +807,8 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
smart_str out_buf = {0};
smart_str eval_buf = {0};
smart_str *pbuf;
int i, err, eval, n;
size_t i;
int err, eval, n;
OnigUChar *pos;
OnigUChar *string_lim;
char *description = NULL;
@ -926,7 +927,7 @@ static void _php_mb_regex_ereg_replace_exec(INTERNAL_FUNCTION_PARAMETERS, OnigOp
n = p[1] - '0';
}
if (n >= 0 && n < regs->num_regs) {
if (regs->beg[n] >= 0 && regs->beg[n] < regs->end[n] && regs->end[n] <= string_len) {
if (regs->beg[n] >= 0 && regs->beg[n] < regs->end[n] && (size_t)regs->end[n] <= string_len) {
smart_str_appendl(pbuf, string + regs->beg[n], regs->end[n] - regs->beg[n]);
}
p += 2;
@ -1100,7 +1101,7 @@ PHP_FUNCTION(mb_split)
beg = regs->beg[0], end = regs->end[0];
/* add it to the array */
if ((pos - (OnigUChar *)string) < end) {
if (beg < string_len && beg >= (chunk_pos - (OnigUChar *)string)) {
if ((size_t)beg < string_len && beg >= (chunk_pos - (OnigUChar *)string)) {
add_next_index_stringl(return_value, (char *)chunk_pos, ((OnigUChar *)(string + beg) - chunk_pos));
--count;
} else {

View File

@ -563,7 +563,7 @@ PHP_FUNCTION(mcrypt_generic_init)
iv_s = emalloc(iv_size + 1);
memset(iv_s, 0, iv_size + 1);
if (key_len > max_key_size) {
if (key_len > (size_t)max_key_size) {
php_error_docref(NULL, E_WARNING, "Key size too large; supplied length: %zd, max: %d", key_len, max_key_size);
key_size = max_key_size;
} else {
@ -571,9 +571,9 @@ PHP_FUNCTION(mcrypt_generic_init)
}
memcpy(key_s, key, key_len);
if (iv_len != iv_size) {
if (iv_len != (size_t)iv_size) {
php_error_docref(NULL, E_WARNING, "Iv size incorrect; supplied length: %zd, needed: %d", iv_len, iv_size);
if (iv_len > iv_size) {
if (iv_len > (size_t)iv_size) {
iv_len = iv_size;
}
}
@ -1387,7 +1387,7 @@ PHP_FUNCTION(mcrypt_create_iv)
}
}
while (read_bytes < size) {
while ((zend_long)read_bytes < size) {
n = read(*fd, iv + read_bytes, size - read_bytes);
if (n <= 0) {
break;

View File

@ -226,7 +226,7 @@ static php_stream_filter *php_mcrypt_filter_create(const char *filtername, zval
}
iv = emalloc(iv_len + 1);
if (iv_len <= Z_STRLEN_P(tmpzval)) {
if ((size_t)iv_len <= Z_STRLEN_P(tmpzval)) {
memcpy(iv, Z_STRVAL_P(tmpzval), iv_len);
} else {
memcpy(iv, Z_STRVAL_P(tmpzval), Z_STRLEN_P(tmpzval));

View File

@ -354,7 +354,7 @@ PHP_FUNCTION(mysqli_stmt_bind_param)
RETURN_FALSE;
}
if (types_len != argc - start) {
if (types_len != (size_t)(argc - start)) {
/* number of bind variables doesn't match number of elements in type definition string */
php_error_docref(NULL, E_WARNING, "Number of elements in type definition string doesn't match number of bind variables");
RETURN_FALSE;
@ -596,7 +596,7 @@ PHP_FUNCTION(mysqli_stmt_bind_result)
MYSQLI_FETCH_RESOURCE_STMT(stmt, mysql_stmt, MYSQLI_STATUS_VALID);
if (argc != mysql_stmt_field_count(stmt->stmt)) {
if ((uint)argc != mysql_stmt_field_count(stmt->stmt)) {
php_error_docref(NULL, E_WARNING, "Number of bind variables doesn't match number of fields in prepared statement");
RETURN_FALSE;
}
@ -1330,7 +1330,7 @@ PHP_FUNCTION(mysqli_field_seek)
}
MYSQLI_FETCH_RESOURCE(result, MYSQL_RES *, mysql_result, "mysqli_result", MYSQLI_STATUS_VALID);
if (fieldnr < 0 || fieldnr >= mysql_num_fields(result)) {
if (fieldnr < 0 || (uint)fieldnr >= mysql_num_fields(result)) {
php_error_docref(NULL, E_WARNING, "Invalid field offset");
RETURN_FALSE;
}

View File

@ -150,7 +150,7 @@ const zend_function_entry mysqli_driver_methods[] = {
PHP_FALIAS(embedded_server_start, mysqli_embedded_server_start, NULL)
PHP_FALIAS(embedded_server_end, mysqli_embedded_server_end, NULL)
#endif
{NULL, NULL, NULL}
PHP_FE_END
};
/* }}} */

View File

@ -32,7 +32,7 @@
/* {{{ mysqli_exception_methods[]
*/
const zend_function_entry mysqli_exception_methods[] = {
{NULL, NULL, NULL}
PHP_FE_END
};
/* }}} */

View File

@ -579,7 +579,7 @@ const zend_function_entry mysqli_link_methods[] = {
PHP_FALIAS(thread_safe, mysqli_thread_safe, arginfo_mysqli_no_params)
PHP_FALIAS(use_result, mysqli_use_result, arginfo_mysqli_no_params)
PHP_FALIAS(refresh,mysqli_refresh, arginfo_class_mysqli_refresh)
{NULL, NULL, NULL}
PHP_FE_END
};
/* }}} */
@ -604,7 +604,7 @@ const zend_function_entry mysqli_result_methods[] = {
PHP_FALIAS(fetch_row, mysqli_fetch_row, arginfo_mysqli_no_params)
PHP_FALIAS(field_seek, mysqli_field_seek, arginfo_class_mysqli_result_and_fieldnr)
PHP_FALIAS(free_result, mysqli_free_result, arginfo_mysqli_no_params)
{NULL, NULL, NULL}
PHP_FE_END
};
/* }}} */
@ -637,7 +637,7 @@ const zend_function_entry mysqli_stmt_methods[] = {
#if defined(MYSQLI_USE_MYSQLND)
PHP_FALIAS(get_result, mysqli_stmt_get_result, arginfo_mysqli_no_params)
#endif
{NULL, NULL, NULL}
PHP_FE_END
};
/* }}} */

View File

@ -153,6 +153,7 @@ zend_object_iterator_funcs php_mysqli_result_iterator_funcs = {
php_mysqli_result_iterator_current_key,
php_mysqli_result_iterator_move_forward,
php_mysqli_result_iterator_rewind,
NULL
};
/* }}} */

View File

@ -315,7 +315,7 @@ PHP_METHOD(mysqli_warning, __construct)
const zend_function_entry mysqli_warning_methods[] = {
PHP_ME(mysqli_warning, __construct, NULL, ZEND_ACC_PROTECTED)
PHP_ME(mysqli_warning, next, NULL, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
PHP_FE_END
};
/* }}} */

View File

@ -130,8 +130,9 @@ PHPAPI MYSQLND_DEBUG * mysqlnd_debug_init(const char * skip_functions[]);
if ((dbg_obj2)) { \
dbg_skip_trace |= !(dbg_obj2)->m->func_enter((dbg_obj2), __LINE__, __FILE__, func_name, strlen(func_name)); \
} \
if (dbg_skip_trace) \
if (dbg_skip_trace) { \
/* EMPTY */ ; /* shut compiler's mouth */ \
} \
do { \
if (((dbg_obj1) && (dbg_obj1)->flags & MYSQLND_DEBUG_PROFILE_CALLS) || \
((dbg_obj2) && (dbg_obj2)->flags & MYSQLND_DEBUG_PROFILE_CALLS)) \

View File

@ -300,7 +300,7 @@ zend_ulong php_mysqlnd_net_field_length(const zend_uchar **packet);
zend_uchar * php_mysqlnd_net_store_length(zend_uchar *packet, const uint64_t length);
size_t php_mysqlnd_net_store_length_size(uint64_t length);
PHPAPI const extern char * const mysqlnd_empty_string;
PHPAPI extern const char * const mysqlnd_empty_string;
enum_func_status php_mysqlnd_rowp_read_binary_protocol(MYSQLND_MEMORY_POOL_CHUNK * row_buffer, zval * fields,
unsigned int field_count, const MYSQLND_FIELD * fields_metadata,

View File

@ -136,7 +136,7 @@ const zend_function_entry birdstep_functions[] = {
PHP_FALIAS(velocis_fieldnum, birdstep_fieldnum, arginfo_birdstep_fieldnum)
PHP_FALIAS(velocis_fieldname, birdstep_fieldname, arginfo_birdstep_fieldname)
/* End temporary aliases */
{NULL, NULL, NULL}
PHP_FE_END
};
zend_module_entry birdstep_module_entry = {

View File

@ -775,7 +775,7 @@ static time_t asn1_time_to_time_t(ASN1_UTCTIME * timestr) /* {{{ */
return (time_t)-1;
}
if (ASN1_STRING_length(timestr) != strlen((const char*)ASN1_STRING_data(timestr))) {
if ((size_t)ASN1_STRING_length(timestr) != strlen((const char*)ASN1_STRING_data(timestr))) {
php_error_docref(NULL, E_WARNING, "illegal length in timestamp");
return (time_t)-1;
}
@ -2901,13 +2901,13 @@ static int php_openssl_make_REQ(struct php_x509_request * req, X509_REQ * csr, z
/* Finally apply defaults from config file */
for(i = 0; i < sk_CONF_VALUE_num(dn_sk); i++) {
int len;
size_t len;
char buffer[200 + 1]; /*200 + \0 !*/
v = sk_CONF_VALUE_value(dn_sk, i);
type = v->name;
len = (int)strlen(type);
len = strlen(type);
if (len < sizeof("_default")) {
continue;
}
@ -5463,7 +5463,7 @@ PHP_FUNCTION(openssl_open)
"Cipher algorithm requires an IV to be supplied as a sixth parameter");
RETURN_FALSE;
}
if (cipher_iv_len != iv_len) {
if ((size_t)cipher_iv_len != iv_len) {
php_error_docref(NULL, E_WARNING, "IV length is invalid");
RETURN_FALSE;
}

View File

@ -413,7 +413,7 @@ static zend_bool matches_san_list(X509 *peer, const char *subject_name) /* {{{ *
if (san->type == GEN_DNS) {
ASN1_STRING_to_UTF8(&cert_name, san->d.dNSName);
if (ASN1_STRING_length(san->d.dNSName) != strlen((const char*)cert_name)) {
if ((size_t)ASN1_STRING_length(san->d.dNSName) != strlen((const char*)cert_name)) {
OPENSSL_free(cert_name);
/* prevent null-byte poisoning*/
continue;
@ -465,7 +465,7 @@ static zend_bool matches_common_name(X509 *peer, const char *subject_name) /* {{
if (cert_name_len == -1) {
php_error_docref(NULL, E_WARNING, "Unable to locate peer certificate CN");
} else if (cert_name_len != strlen(buf)) {
} else if ((size_t)cert_name_len != strlen(buf)) {
php_error_docref(NULL, E_WARNING, "Peer certificate CN=`%.*s' is malformed", cert_name_len, buf);
} else if (matches_wildcard_name(subject_name, buf)) {
is_match = 1;
@ -579,7 +579,7 @@ static int passwd_callback(char *buf, int num, int verify, void *data) /* {{{ */
GET_VER_OPT_STRING("passphrase", passphrase);
if (passphrase) {
if (Z_STRLEN_P(val) < num - 1) {
if (Z_STRLEN_P(val) < (size_t)num - 1) {
memcpy(buf, Z_STRVAL_P(val), Z_STRLEN_P(val)+1);
return (int)Z_STRLEN_P(val);
}

View File

@ -190,7 +190,8 @@ pdo_driver_t *pdo_find_driver(const char *name, int namelen) /* {{{ */
PDO_API int php_pdo_parse_data_source(const char *data_source, zend_ulong data_source_len, struct pdo_data_src_parser *parsed, int nparams) /* {{{ */
{
int i, j;
zend_ulong i;
int j;
int valstart = -1;
int semi = -1;
int optstart = 0;

View File

@ -1246,7 +1246,7 @@ const zend_function_entry pdo_dbh_functions[] = /* {{{ */ {
PHP_ME(PDO, __wakeup, arginfo_pdo__void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
PHP_ME(PDO, __sleep, arginfo_pdo__void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
PHP_ME(PDO, getAvailableDrivers, arginfo_pdo__void, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC)
{NULL, NULL, NULL}
PHP_FE_END
};
/* }}} */
@ -1309,7 +1309,7 @@ int pdo_hash_methods(pdo_dbh_object_t *dbh_obj, int kind)
func.arg_info = (zend_internal_arg_info*)funcs->arg_info + 1;
func.num_args = funcs->num_args;
if (info->required_num_args == -1) {
if (info->required_num_args == (uint32_t)-1) {
func.required_num_args = funcs->num_args;
} else {
func.required_num_args = info->required_num_args;

View File

@ -400,7 +400,7 @@ PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, size_t inquery_len
Scanner s;
char *ptr, *newbuffer;
int t;
int bindno = 0;
uint32_t bindno = 0;
int ret = 0;
size_t newbuffer_len;
HashTable *params;

View File

@ -86,7 +86,7 @@ PDO_API int pdo_parse_params(pdo_stmt_t *stmt, char *inquery, size_t inquery_len
Scanner s;
char *ptr, *newbuffer;
int t;
int bindno = 0;
uint32_t bindno = 0;
int ret = 0;
size_t newbuffer_len;
HashTable *params;

View File

@ -311,7 +311,7 @@ void pdo_sqlstate_fini_error_table(void)
int pdo_sqlstate_init_error_table(void)
{
int i;
size_t i;
const struct pdo_sqlstate_info *info;
zend_hash_init(&err_hash, sizeof(err_initializer)/sizeof(err_initializer[0]), NULL, NULL, 1);

View File

@ -551,7 +551,7 @@ static inline void fetch_value(pdo_stmt_t *stmt, zval *dest, int colno, int *typ
col = &stmt->columns[colno];
type = PDO_PARAM_TYPE(col->param_type);
new_type = type_override ? PDO_PARAM_TYPE(*type_override) : type;
new_type = type_override ? (int)PDO_PARAM_TYPE(*type_override) : type;
value = NULL;
value_len = 0;
@ -1537,10 +1537,11 @@ static PHP_METHOD(PDOStatement, fetchAll)
static int register_bound_param(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt, int is_param) /* {{{ */
{
struct pdo_bound_param_data param = {{{0}}};
struct pdo_bound_param_data param;
zend_long param_type = PDO_PARAM_STR;
zval *parameter, *driver_params = NULL;
memset(&param, 0, sizeof(param));
param.paramno = -1;
if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(),
@ -1580,11 +1581,12 @@ static int register_bound_param(INTERNAL_FUNCTION_PARAMETERS, pdo_stmt_t *stmt,
bind an input parameter to the value of a PHP variable. $paramno is the 1-based position of the placeholder in the SQL statement (but can be the parameter name for drivers that support named placeholders). It should be called prior to execute(). */
static PHP_METHOD(PDOStatement, bindValue)
{
struct pdo_bound_param_data param = {{{0}}};
struct pdo_bound_param_data param;
zend_long param_type = PDO_PARAM_STR;
zval *parameter;
PHP_STMT_GET_OBJ;
memset(&param, 0, sizeof(param));
param.paramno = -1;
if (FAILURE == zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, ZEND_NUM_ARGS(),
@ -2177,7 +2179,7 @@ const zend_function_entry pdo_dbstmt_functions[] = {
PHP_ME(PDOStatement, debugDumpParams, arginfo_pdostatement__void, ZEND_ACC_PUBLIC)
PHP_ME(PDOStatement, __wakeup, arginfo_pdostatement__void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
PHP_ME(PDOStatement, __sleep, arginfo_pdostatement__void, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL)
{NULL, NULL, NULL}
PHP_FE_END
};
/* {{{ overloaded handlers for PDOStatement class */
@ -2448,6 +2450,7 @@ static zend_object_iterator_funcs pdo_stmt_iter_funcs = {
pdo_stmt_iter_get_data,
pdo_stmt_iter_get_key,
pdo_stmt_iter_move_forwards,
NULL,
NULL
};
@ -2480,7 +2483,7 @@ zend_object_iterator *pdo_stmt_iter_get(zend_class_entry *ce, zval *object, int
/* {{{ overloaded handlers for PDORow class (used by PDO_FETCH_LAZY) */
const zend_function_entry pdo_row_functions[] = {
{NULL, NULL, NULL}
PHP_FE_END
};
static zval *row_prop_read(zval *object, zval *member, int type, void **cache_slot, zval *rv)
@ -2679,6 +2682,11 @@ zend_object_handlers pdo_row_object_handlers = {
row_get_classname,
row_compare,
NULL, /* cast */
NULL,
NULL,
NULL,
NULL,
NULL,
NULL
};

View File

@ -523,7 +523,10 @@ static struct pdo_dbh_methods mysql_methods = {
pdo_mysql_last_insert_id,
pdo_mysql_fetch_error_func,
pdo_mysql_get_attribute,
pdo_mysql_check_liveness
pdo_mysql_check_liveness,
NULL,
NULL,
NULL
};
/* }}} */
@ -537,7 +540,8 @@ static struct pdo_dbh_methods mysql_methods = {
static int pdo_mysql_handle_factory(pdo_dbh_t *dbh, zval *driver_options)
{
pdo_mysql_db_handle *H;
int i, ret = 0;
size_t i;
int ret = 0;
char *host = NULL, *unix_socket = NULL;
unsigned int port = 3306;
char *dbname;

View File

@ -41,7 +41,7 @@
/* {{{ pdo_pgsql_functions[] */
const zend_function_entry pdo_pgsql_functions[] = {
{NULL, NULL, NULL}
PHP_FE_END
};
/* }}} */

View File

@ -813,7 +813,7 @@ static PHP_METHOD(PDO, pgsqlCopyToFile)
if (ret == -1) {
break; /* done */
} else if (ret > 0) {
if (php_stream_write(stream, csv, ret) != ret) {
if (php_stream_write(stream, csv, ret) != (size_t)ret) {
pdo_pgsql_error_msg(dbh, PGRES_FATAL_ERROR, "Unable to write to file");
PQfreemem(csv);
php_stream_close(stream);

View File

@ -727,7 +727,8 @@ static struct pdo_dbh_methods sqlite_methods = {
pdo_sqlite_get_attribute,
NULL, /* check_liveness: not needed */
get_driver_methods,
pdo_sqlite_request_shutdown
pdo_sqlite_request_shutdown,
NULL
};
static char *make_filename_safe(const char *filename)

View File

@ -3333,7 +3333,7 @@ PHP_FUNCTION(pg_lo_unlink)
}
else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc,
"rl", &pgsql_link, &oid_long) == SUCCESS) {
if (oid_long <= InvalidOid) {
if (oid_long <= (zend_long)InvalidOid) {
php_error_docref(NULL, E_NOTICE, "Invalid OID specified");
RETURN_FALSE;
}
@ -3353,7 +3353,7 @@ PHP_FUNCTION(pg_lo_unlink)
}
else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc,
"l", &oid_long) == SUCCESS) {
if (oid_long <= InvalidOid) {
if (oid_long <= (zend_long)InvalidOid) {
php_error_docref(NULL, E_NOTICE, "Invalid OID is specified");
RETURN_FALSE;
}
@ -3407,7 +3407,7 @@ PHP_FUNCTION(pg_lo_open)
}
else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc,
"rls", &pgsql_link, &oid_long, &mode_string, &mode_strlen) == SUCCESS) {
if (oid_long <= InvalidOid) {
if (oid_long <= (zend_long)InvalidOid) {
php_error_docref(NULL, E_NOTICE, "Invalid OID specified");
RETURN_FALSE;
}
@ -3427,7 +3427,7 @@ PHP_FUNCTION(pg_lo_open)
}
else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc,
"ls", &oid_long, &mode_string, &mode_strlen) == SUCCESS) {
if (oid_long <= InvalidOid) {
if (oid_long <= (zend_long)InvalidOid) {
php_error_docref(NULL, E_NOTICE, "Invalid OID specified");
RETURN_FALSE;
}
@ -3599,7 +3599,7 @@ PHP_FUNCTION(pg_lo_write)
RETURN_FALSE;
}
if ((nbytes = lo_write((PGconn *)pgsql->conn, pgsql->lofd, str, len)) == -1) {
if ((nbytes = lo_write((PGconn *)pgsql->conn, pgsql->lofd, str, len)) == (size_t)-1) {
RETURN_FALSE;
}
@ -3738,7 +3738,7 @@ PHP_FUNCTION(pg_lo_export)
/* allow string to handle large OID value correctly */
if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc,
"rlp", &pgsql_link, &oid_long, &file_out, &name_len) == SUCCESS) {
if (oid_long <= InvalidOid) {
if (oid_long <= (zend_long)InvalidOid) {
php_error_docref(NULL, E_NOTICE, "Invalid OID specified");
RETURN_FALSE;
}
@ -3757,7 +3757,7 @@ PHP_FUNCTION(pg_lo_export)
}
else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc,
"lp", &oid_long, &file_out, &name_len) == SUCCESS) {
if (oid_long <= InvalidOid) {
if (oid_long <= (zend_long)InvalidOid) {
php_error_docref(NULL, E_NOTICE, "Invalid OID specified");
RETURN_FALSE;
}
@ -3789,7 +3789,7 @@ PHP_FUNCTION(pg_lo_export)
else if (zend_parse_parameters_ex(ZEND_PARSE_PARAMS_QUIET, argc,
"lpr", &oid_long, &file_out, &name_len, &pgsql_link) == SUCCESS) {
php_error_docref(NULL, E_NOTICE, "Old API is used");
if (oid_long <= InvalidOid) {
if (oid_long <= (zend_long)InvalidOid) {
php_error_docref(NULL, E_NOTICE, "Invalid OID specified");
RETURN_FALSE;
}

View File

@ -180,7 +180,7 @@ static int phar_compare_dir_name(const void *a, const void *b) /* {{{ */
static php_stream *phar_make_dirstream(char *dir, HashTable *manifest) /* {{{ */
{
HashTable *data;
int dirlen = strlen(dir);
size_t dirlen = strlen(dir);
char *entry, *found, *save;
zend_string *str_key;
uint keylen;

View File

@ -3473,7 +3473,7 @@ void phar_request_initialize(void) /* {{{ */
PHP_RSHUTDOWN_FUNCTION(phar) /* {{{ */
{
int i;
uint32_t i;
PHAR_G(request_ends) = 1;

View File

@ -1315,7 +1315,7 @@ PHP_METHOD(Phar, unlinkArchive)
zname_len = strlen(zname);
if (zname_len > 7 && !memcmp(zname, "phar://", 7) && SUCCESS == phar_split_fname(zname, zname_len, &arch, &arch_len, &entry, &entry_len, 2, 0)) {
if (arch_len == fname_len && !memcmp(arch, fname, arch_len)) {
if ((size_t)arch_len == fname_len && !memcmp(arch, fname, arch_len)) {
zend_throw_exception_ex(phar_ce_PharException, 0, "phar archive \"%s\" cannot be unlinked from within itself", fname);
efree(arch);
efree(entry);
@ -2655,7 +2655,7 @@ PHP_METHOD(Phar, setAlias)
}
if (zend_parse_parameters(ZEND_NUM_ARGS(), "s", &alias, &alias_len) == SUCCESS) {
if (alias_len == phar_obj->archive->alias_len && memcmp(phar_obj->archive->alias, alias, alias_len) == 0) {
if (alias_len == (size_t)phar_obj->archive->alias_len && memcmp(phar_obj->archive->alias, alias, alias_len) == 0) {
RETURN_TRUE;
}
if (alias_len && NULL != (fd_ptr = zend_hash_str_find_ptr(&(PHAR_G(phar_alias_map)), alias, alias_len))) {
@ -3551,7 +3551,7 @@ static void phar_add_file(phar_archive_data **pphar, char *filename, int filenam
phar_entry_data *data;
php_stream *contents_file;
if (filename_len >= sizeof(".phar")-1 && !memcmp(filename, ".phar", sizeof(".phar")-1) && (filename[5] == '/' || filename[5] == '\\' || filename[5] == '\0')) {
if (filename_len >= (int)sizeof(".phar")-1 && !memcmp(filename, ".phar", sizeof(".phar")-1) && (filename[5] == '/' || filename[5] == '\\' || filename[5] == '\0')) {
zend_throw_exception_ex(spl_ce_BadMethodCallException, 0, "Cannot create any files in magic \".phar\" directory");
return;
}

View File

@ -45,6 +45,7 @@ php_stream_wrapper_ops phar_stream_wops = {
phar_wrapper_rename, /* rename */
phar_wrapper_mkdir, /* create directory */
phar_wrapper_rmdir, /* remove directory */
NULL
};
php_stream_wrapper php_stream_phar_wrapper = {

View File

@ -178,7 +178,7 @@ int phar_mount_entry(phar_archive_data *phar, char *filename, int filename_len,
return FAILURE;
}
if (path_len >= sizeof(".phar")-1 && !memcmp(path, ".phar", sizeof(".phar")-1)) {
if (path_len >= (int)sizeof(".phar")-1 && !memcmp(path, ".phar", sizeof(".phar")-1)) {
/* no creating magic phar files by mounting them */
return FAILURE;
}
@ -1225,7 +1225,7 @@ phar_entry_info *phar_get_entry_info_dir(phar_archive_data *phar, char *path, in
*error = NULL;
}
if (security && path_len >= sizeof(".phar")-1 && !memcmp(path, ".phar", sizeof(".phar")-1)) {
if (security && path_len >= (int)sizeof(".phar")-1 && !memcmp(path, ".phar", sizeof(".phar")-1)) {
if (error) {
spprintf(error, 4096, "phar error: cannot directly access magic \".phar\" directory or files within it");
}
@ -1403,7 +1403,7 @@ static int phar_call_openssl_signverify(int is_sign, php_stream *fp, zend_off_t
ZVAL_EMPTY_STRING(&zp[0]);
}
if (end != Z_STRLEN(zp[0])) {
if ((size_t)end != Z_STRLEN(zp[0])) {
zval_dtor(&zp[0]);
zval_dtor(&zp[1]);
zval_dtor(&zp[2]);
@ -1563,7 +1563,7 @@ int phar_verify_signature(php_stream *fp, size_t end_of_phar, uint32_t sig_type,
EVP_VerifyInit(&md_ctx, mdtype);
read_len = end_of_phar;
if (read_len > sizeof(buf)) {
if ((size_t)read_len > sizeof(buf)) {
read_size = sizeof(buf);
} else {
read_size = (int)read_len;
@ -1605,7 +1605,7 @@ int phar_verify_signature(php_stream *fp, size_t end_of_phar, uint32_t sig_type,
PHP_SHA512Init(&context);
read_len = end_of_phar;
if (read_len > sizeof(buf)) {
if ((size_t)read_len > sizeof(buf)) {
read_size = sizeof(buf);
} else {
read_size = (int)read_len;
@ -1638,7 +1638,7 @@ int phar_verify_signature(php_stream *fp, size_t end_of_phar, uint32_t sig_type,
PHP_SHA256Init(&context);
read_len = end_of_phar;
if (read_len > sizeof(buf)) {
if ((size_t)read_len > sizeof(buf)) {
read_size = sizeof(buf);
} else {
read_size = (int)read_len;
@ -1679,7 +1679,7 @@ int phar_verify_signature(php_stream *fp, size_t end_of_phar, uint32_t sig_type,
PHP_SHA1Init(&context);
read_len = end_of_phar;
if (read_len > sizeof(buf)) {
if ((size_t)read_len > sizeof(buf)) {
read_size = sizeof(buf);
} else {
read_size = (int)read_len;
@ -1712,7 +1712,7 @@ int phar_verify_signature(php_stream *fp, size_t end_of_phar, uint32_t sig_type,
PHP_MD5Init(&context);
read_len = end_of_phar;
if (read_len > sizeof(buf)) {
if ((size_t)read_len > sizeof(buf)) {
read_size = sizeof(buf);
} else {
read_size = (int)read_len;

View File

@ -167,7 +167,7 @@ int phar_parse_zipfile(php_stream *fp, char *fname, int fname_len, char *alias,
{
phar_zip_dir_end locator;
char buf[sizeof(locator) + 65536];
zend_long size;
size_t size;
uint16_t i;
phar_archive_data *mydata = NULL;
phar_entry_info entry = {0};
@ -395,10 +395,9 @@ foundit:
if (entry.filename_len == sizeof(".phar/signature.bin")-1 && !strncmp(entry.filename, ".phar/signature.bin", sizeof(".phar/signature.bin")-1)) {
size_t read;
php_stream *sigfile;
zend_off_t now;
char *sig;
now = php_stream_tell(fp);
php_stream_tell(fp);
pefree(entry.filename, entry.is_persistent);
sigfile = php_stream_fopen_tmpfile();
if (!sigfile) {
@ -1110,14 +1109,14 @@ static int phar_zip_applysignature(phar_archive_data *phar, struct _phar_zip_pas
char *signature, sigbuf[8];
phar_entry_info entry = {0};
php_stream *newfile;
zend_off_t tell, st;
zend_off_t tell;
newfile = php_stream_fopen_tmpfile();
if (newfile == NULL) {
spprintf(pass->error, 0, "phar error: unable to create temporary file for the signature file");
return FAILURE;
}
st = tell = php_stream_tell(pass->filefp);
tell = php_stream_tell(pass->filefp);
/* copy the local files, central directory, and the zip comment to generate the hash */
php_stream_seek(pass->filefp, 0, SEEK_SET);
php_stream_copy_to_stream_ex(pass->filefp, newfile, tell, NULL);

View File

@ -592,8 +592,9 @@ static int readline_shell_run(void) /* {{{ */
if (PG(auto_prepend_file) && PG(auto_prepend_file)[0]) {
zend_file_handle *prepend_file_p;
zend_file_handle prepend_file = {{0}};
zend_file_handle prepend_file;
memset(&prepend_file, 0, sizeof(prepend_file));
prepend_file.filename = PG(auto_prepend_file);
prepend_file.opened_path = NULL;
prepend_file.free_filename = 0;

View File

@ -657,7 +657,7 @@ static zend_op* _get_recv_op(zend_op_array *op_array, uint32_t offset)
++offset;
while (op < end) {
if ((op->opcode == ZEND_RECV || op->opcode == ZEND_RECV_INIT
|| op->opcode == ZEND_RECV_VARIADIC) && op->op1.num == (zend_long)offset)
|| op->opcode == ZEND_RECV_VARIADIC) && op->op1.num == offset)
{
return op;
}

View File

@ -222,7 +222,7 @@ static void ps_files_open(ps_files *data, const char *key)
static int ps_files_write(ps_files *data, zend_string *key, zend_string *val)
{
zend_long n = 0;
size_t n = 0;
/* PS(id) may be changed by calling session_regenerate_id().
Re-initialization should be tried here. ps_files_open() checks
@ -262,7 +262,7 @@ static int ps_files_write(ps_files *data, zend_string *key, zend_string *val)
#endif
if (n != ZSTR_LEN(val)) {
if (n == -1) {
if (n == (size_t)-1) {
php_error_docref(NULL, E_WARNING, "write failed: %s (%d)", strerror(errno), errno);
} else {
php_error_docref(NULL, E_WARNING, "write wrote less bytes than requested");

View File

@ -2597,7 +2597,7 @@ static const zend_function_entry php_session_iface_functions[] = {
PHP_ABSTRACT_ME(SessionHandlerInterface, write, arginfo_session_class_write)
PHP_ABSTRACT_ME(SessionHandlerInterface, destroy, arginfo_session_class_destroy)
PHP_ABSTRACT_ME(SessionHandlerInterface, gc, arginfo_session_class_gc)
{ NULL, NULL, NULL }
PHP_FE_END
};
/* }}} */
@ -2605,7 +2605,7 @@ static const zend_function_entry php_session_iface_functions[] = {
*/
static const zend_function_entry php_session_id_iface_functions[] = {
PHP_ABSTRACT_ME(SessionIdInterface, create_sid, arginfo_session_class_create_sid)
{ NULL, NULL, NULL }
PHP_FE_END
};
/* }}} */
@ -2614,7 +2614,7 @@ static const zend_function_entry php_session_id_iface_functions[] = {
static const zend_function_entry php_session_update_timestamp_iface_functions[] = {
PHP_ABSTRACT_ME(SessionUpdateTimestampHandlerInterface, validateId, arginfo_session_class_validateId)
PHP_ABSTRACT_ME(SessionUpdateTimestampHandlerInterface, updateTimestamp, arginfo_session_class_updateTimestamp)
{ NULL, NULL, NULL }
PHP_FE_END
};
/* }}} */
@ -2628,7 +2628,7 @@ static const zend_function_entry php_session_class_functions[] = {
PHP_ME(SessionHandler, destroy, arginfo_session_class_destroy, ZEND_ACC_PUBLIC)
PHP_ME(SessionHandler, gc, arginfo_session_class_gc, ZEND_ACC_PUBLIC)
PHP_ME(SessionHandler, create_sid, arginfo_session_class_create_sid, ZEND_ACC_PUBLIC)
{ NULL, NULL, NULL }
PHP_FE_END
};
/* }}} */

View File

@ -2032,7 +2032,9 @@ static zend_object_handlers sxe_object_handlers = { /* {{{ */
sxe_count_elements,
sxe_get_debug_info,
NULL,
sxe_get_gc
sxe_get_gc,
NULL,
NULL
};
/* }}} */
@ -2334,6 +2336,7 @@ zend_object_iterator_funcs php_sxe_iterator_funcs = { /* {{{ */
php_sxe_iterator_current_key,
php_sxe_iterator_move_forward,
php_sxe_iterator_rewind,
NULL
};
/* }}} */

View File

@ -189,7 +189,7 @@ static const zend_function_entry funcs_SimpleXMLIterator[] = {
PHP_ME(ce_SimpleXMLIterator, next, arginfo_simplexmliterator__void, ZEND_ACC_PUBLIC)
PHP_ME(ce_SimpleXMLIterator, hasChildren, arginfo_simplexmliterator__void, ZEND_ACC_PUBLIC)
PHP_ME(ce_SimpleXMLIterator, getChildren, arginfo_simplexmliterator__void, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
PHP_FE_END
};
/* }}} */

View File

@ -141,94 +141,94 @@ static void set_ns_and_type(xmlNodePtr node, encodeTypePtr type);
}
encode defaultEncoding[] = {
{{UNKNOWN_TYPE, NULL, NULL, NULL}, guess_zval_convert, guess_xml_convert},
{{UNKNOWN_TYPE, NULL, NULL, NULL, NULL}, guess_zval_convert, guess_xml_convert},
{{IS_NULL, "nil", XSI_NAMESPACE, NULL}, to_zval_null, to_xml_null},
{{IS_STRING, XSD_STRING_STRING, XSD_NAMESPACE, NULL}, to_zval_string, to_xml_string},
{{IS_LONG, XSD_INT_STRING, XSD_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{IS_DOUBLE, XSD_FLOAT_STRING, XSD_NAMESPACE, NULL}, to_zval_double, to_xml_double},
{{IS_FALSE, XSD_BOOLEAN_STRING, XSD_NAMESPACE, NULL}, to_zval_bool, to_xml_bool},
{{IS_TRUE, XSD_BOOLEAN_STRING, XSD_NAMESPACE, NULL}, to_zval_bool, to_xml_bool},
{{IS_CONSTANT, XSD_STRING_STRING, XSD_NAMESPACE, NULL}, to_zval_string, to_xml_string},
{{IS_ARRAY, SOAP_ENC_ARRAY_STRING, SOAP_1_1_ENC_NAMESPACE, NULL}, to_zval_array, guess_array_map},
{{IS_OBJECT, SOAP_ENC_OBJECT_STRING, SOAP_1_1_ENC_NAMESPACE, NULL}, to_zval_object, to_xml_object},
{{IS_ARRAY, SOAP_ENC_ARRAY_STRING, SOAP_1_2_ENC_NAMESPACE, NULL}, to_zval_array, guess_array_map},
{{IS_OBJECT, SOAP_ENC_OBJECT_STRING, SOAP_1_2_ENC_NAMESPACE, NULL}, to_zval_object, to_xml_object},
{{IS_NULL, "nil", XSI_NAMESPACE, NULL, NULL}, to_zval_null, to_xml_null},
{{IS_STRING, XSD_STRING_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_string, to_xml_string},
{{IS_LONG, XSD_INT_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_long, to_xml_long},
{{IS_DOUBLE, XSD_FLOAT_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_double, to_xml_double},
{{IS_FALSE, XSD_BOOLEAN_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_bool, to_xml_bool},
{{IS_TRUE, XSD_BOOLEAN_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_bool, to_xml_bool},
{{IS_CONSTANT, XSD_STRING_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_string, to_xml_string},
{{IS_ARRAY, SOAP_ENC_ARRAY_STRING, SOAP_1_1_ENC_NAMESPACE, NULL, NULL}, to_zval_array, guess_array_map},
{{IS_OBJECT, SOAP_ENC_OBJECT_STRING, SOAP_1_1_ENC_NAMESPACE, NULL, NULL}, to_zval_object, to_xml_object},
{{IS_ARRAY, SOAP_ENC_ARRAY_STRING, SOAP_1_2_ENC_NAMESPACE, NULL, NULL}, to_zval_array, guess_array_map},
{{IS_OBJECT, SOAP_ENC_OBJECT_STRING, SOAP_1_2_ENC_NAMESPACE, NULL, NULL}, to_zval_object, to_xml_object},
{{XSD_STRING, XSD_STRING_STRING, XSD_NAMESPACE, NULL}, to_zval_string, to_xml_string},
{{XSD_BOOLEAN, XSD_BOOLEAN_STRING, XSD_NAMESPACE, NULL}, to_zval_bool, to_xml_bool},
{{XSD_DECIMAL, XSD_DECIMAL_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_string},
{{XSD_FLOAT, XSD_FLOAT_STRING, XSD_NAMESPACE, NULL}, to_zval_double, to_xml_double},
{{XSD_DOUBLE, XSD_DOUBLE_STRING, XSD_NAMESPACE, NULL}, to_zval_double, to_xml_double},
{{XSD_STRING, XSD_STRING_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_string, to_xml_string},
{{XSD_BOOLEAN, XSD_BOOLEAN_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_bool, to_xml_bool},
{{XSD_DECIMAL, XSD_DECIMAL_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_string},
{{XSD_FLOAT, XSD_FLOAT_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_double, to_xml_double},
{{XSD_DOUBLE, XSD_DOUBLE_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_double, to_xml_double},
{{XSD_DATETIME, XSD_DATETIME_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_datetime},
{{XSD_TIME, XSD_TIME_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_time},
{{XSD_DATE, XSD_DATE_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_date},
{{XSD_GYEARMONTH, XSD_GYEARMONTH_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_gyearmonth},
{{XSD_GYEAR, XSD_GYEAR_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_gyear},
{{XSD_GMONTHDAY, XSD_GMONTHDAY_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_gmonthday},
{{XSD_GDAY, XSD_GDAY_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_gday},
{{XSD_GMONTH, XSD_GMONTH_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_gmonth},
{{XSD_DURATION, XSD_DURATION_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_duration},
{{XSD_DATETIME, XSD_DATETIME_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_datetime},
{{XSD_TIME, XSD_TIME_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_time},
{{XSD_DATE, XSD_DATE_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_date},
{{XSD_GYEARMONTH, XSD_GYEARMONTH_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_gyearmonth},
{{XSD_GYEAR, XSD_GYEAR_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_gyear},
{{XSD_GMONTHDAY, XSD_GMONTHDAY_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_gmonthday},
{{XSD_GDAY, XSD_GDAY_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_gday},
{{XSD_GMONTH, XSD_GMONTH_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_gmonth},
{{XSD_DURATION, XSD_DURATION_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_duration},
{{XSD_HEXBINARY, XSD_HEXBINARY_STRING, XSD_NAMESPACE, NULL}, to_zval_hexbin, to_xml_hexbin},
{{XSD_BASE64BINARY, XSD_BASE64BINARY_STRING, XSD_NAMESPACE, NULL}, to_zval_base64, to_xml_base64},
{{XSD_HEXBINARY, XSD_HEXBINARY_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_hexbin, to_xml_hexbin},
{{XSD_BASE64BINARY, XSD_BASE64BINARY_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_base64, to_xml_base64},
{{XSD_LONG, XSD_LONG_STRING, XSD_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{XSD_INT, XSD_INT_STRING, XSD_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{XSD_SHORT, XSD_SHORT_STRING, XSD_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{XSD_BYTE, XSD_BYTE_STRING, XSD_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{XSD_NONPOSITIVEINTEGER, XSD_NONPOSITIVEINTEGER_STRING, XSD_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{XSD_POSITIVEINTEGER, XSD_POSITIVEINTEGER_STRING, XSD_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{XSD_NONNEGATIVEINTEGER, XSD_NONNEGATIVEINTEGER_STRING, XSD_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{XSD_NEGATIVEINTEGER, XSD_NEGATIVEINTEGER_STRING, XSD_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{XSD_UNSIGNEDBYTE, XSD_UNSIGNEDBYTE_STRING, XSD_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{XSD_UNSIGNEDSHORT, XSD_UNSIGNEDSHORT_STRING, XSD_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{XSD_UNSIGNEDINT, XSD_UNSIGNEDINT_STRING, XSD_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{XSD_UNSIGNEDLONG, XSD_UNSIGNEDLONG_STRING, XSD_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{XSD_INTEGER, XSD_INTEGER_STRING, XSD_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{XSD_LONG, XSD_LONG_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_long, to_xml_long},
{{XSD_INT, XSD_INT_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_long, to_xml_long},
{{XSD_SHORT, XSD_SHORT_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_long, to_xml_long},
{{XSD_BYTE, XSD_BYTE_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_long, to_xml_long},
{{XSD_NONPOSITIVEINTEGER, XSD_NONPOSITIVEINTEGER_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_long, to_xml_long},
{{XSD_POSITIVEINTEGER, XSD_POSITIVEINTEGER_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_long, to_xml_long},
{{XSD_NONNEGATIVEINTEGER, XSD_NONNEGATIVEINTEGER_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_long, to_xml_long},
{{XSD_NEGATIVEINTEGER, XSD_NEGATIVEINTEGER_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_long, to_xml_long},
{{XSD_UNSIGNEDBYTE, XSD_UNSIGNEDBYTE_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_long, to_xml_long},
{{XSD_UNSIGNEDSHORT, XSD_UNSIGNEDSHORT_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_long, to_xml_long},
{{XSD_UNSIGNEDINT, XSD_UNSIGNEDINT_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_long, to_xml_long},
{{XSD_UNSIGNEDLONG, XSD_UNSIGNEDLONG_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_long, to_xml_long},
{{XSD_INTEGER, XSD_INTEGER_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_long, to_xml_long},
{{XSD_ANYTYPE, XSD_ANYTYPE_STRING, XSD_NAMESPACE, NULL}, guess_zval_convert, guess_xml_convert},
{{XSD_UR_TYPE, XSD_UR_TYPE_STRING, XSD_NAMESPACE, NULL}, guess_zval_convert, guess_xml_convert},
{{XSD_ANYURI, XSD_ANYURI_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_string},
{{XSD_QNAME, XSD_QNAME_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_string},
{{XSD_NOTATION, XSD_NOTATION_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_string},
{{XSD_NORMALIZEDSTRING, XSD_NORMALIZEDSTRING_STRING, XSD_NAMESPACE, NULL}, to_zval_stringr, to_xml_string},
{{XSD_TOKEN, XSD_TOKEN_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_string},
{{XSD_LANGUAGE, XSD_LANGUAGE_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_string},
{{XSD_NMTOKEN, XSD_NMTOKEN_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_string},
{{XSD_NMTOKENS, XSD_NMTOKENS_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_list1},
{{XSD_NAME, XSD_NAME_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_string},
{{XSD_NCNAME, XSD_NCNAME_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_string},
{{XSD_ID, XSD_ID_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_string},
{{XSD_IDREF, XSD_IDREF_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_string},
{{XSD_IDREFS, XSD_IDREFS_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_list1},
{{XSD_ENTITY, XSD_ENTITY_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_string},
{{XSD_ENTITIES, XSD_ENTITIES_STRING, XSD_NAMESPACE, NULL}, to_zval_stringc, to_xml_list1},
{{XSD_ANYTYPE, XSD_ANYTYPE_STRING, XSD_NAMESPACE, NULL, NULL}, guess_zval_convert, guess_xml_convert},
{{XSD_UR_TYPE, XSD_UR_TYPE_STRING, XSD_NAMESPACE, NULL, NULL}, guess_zval_convert, guess_xml_convert},
{{XSD_ANYURI, XSD_ANYURI_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_string},
{{XSD_QNAME, XSD_QNAME_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_string},
{{XSD_NOTATION, XSD_NOTATION_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_string},
{{XSD_NORMALIZEDSTRING, XSD_NORMALIZEDSTRING_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringr, to_xml_string},
{{XSD_TOKEN, XSD_TOKEN_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_string},
{{XSD_LANGUAGE, XSD_LANGUAGE_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_string},
{{XSD_NMTOKEN, XSD_NMTOKEN_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_string},
{{XSD_NMTOKENS, XSD_NMTOKENS_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_list1},
{{XSD_NAME, XSD_NAME_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_string},
{{XSD_NCNAME, XSD_NCNAME_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_string},
{{XSD_ID, XSD_ID_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_string},
{{XSD_IDREF, XSD_IDREF_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_string},
{{XSD_IDREFS, XSD_IDREFS_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_list1},
{{XSD_ENTITY, XSD_ENTITY_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_string},
{{XSD_ENTITIES, XSD_ENTITIES_STRING, XSD_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_list1},
{{APACHE_MAP, APACHE_MAP_STRING, APACHE_NAMESPACE, NULL}, to_zval_map, to_xml_map},
{{APACHE_MAP, APACHE_MAP_STRING, APACHE_NAMESPACE, NULL, NULL}, to_zval_map, to_xml_map},
{{SOAP_ENC_OBJECT, SOAP_ENC_OBJECT_STRING, SOAP_1_1_ENC_NAMESPACE, NULL}, to_zval_object, to_xml_object},
{{SOAP_ENC_ARRAY, SOAP_ENC_ARRAY_STRING, SOAP_1_1_ENC_NAMESPACE, NULL}, to_zval_array, to_xml_array},
{{SOAP_ENC_OBJECT, SOAP_ENC_OBJECT_STRING, SOAP_1_2_ENC_NAMESPACE, NULL}, to_zval_object, to_xml_object},
{{SOAP_ENC_ARRAY, SOAP_ENC_ARRAY_STRING, SOAP_1_2_ENC_NAMESPACE, NULL}, to_zval_array, to_xml_array},
{{SOAP_ENC_OBJECT, SOAP_ENC_OBJECT_STRING, SOAP_1_1_ENC_NAMESPACE, NULL, NULL}, to_zval_object, to_xml_object},
{{SOAP_ENC_ARRAY, SOAP_ENC_ARRAY_STRING, SOAP_1_1_ENC_NAMESPACE, NULL, NULL}, to_zval_array, to_xml_array},
{{SOAP_ENC_OBJECT, SOAP_ENC_OBJECT_STRING, SOAP_1_2_ENC_NAMESPACE, NULL, NULL}, to_zval_object, to_xml_object},
{{SOAP_ENC_ARRAY, SOAP_ENC_ARRAY_STRING, SOAP_1_2_ENC_NAMESPACE, NULL, NULL}, to_zval_array, to_xml_array},
/* support some of the 1999 data types */
{{XSD_STRING, XSD_STRING_STRING, XSD_1999_NAMESPACE, NULL}, to_zval_string, to_xml_string},
{{XSD_BOOLEAN, XSD_BOOLEAN_STRING, XSD_1999_NAMESPACE, NULL}, to_zval_bool, to_xml_bool},
{{XSD_DECIMAL, XSD_DECIMAL_STRING, XSD_1999_NAMESPACE, NULL}, to_zval_stringc, to_xml_string},
{{XSD_FLOAT, XSD_FLOAT_STRING, XSD_1999_NAMESPACE, NULL}, to_zval_double, to_xml_double},
{{XSD_DOUBLE, XSD_DOUBLE_STRING, XSD_1999_NAMESPACE, NULL}, to_zval_double, to_xml_double},
{{XSD_STRING, XSD_STRING_STRING, XSD_1999_NAMESPACE, NULL, NULL}, to_zval_string, to_xml_string},
{{XSD_BOOLEAN, XSD_BOOLEAN_STRING, XSD_1999_NAMESPACE, NULL, NULL}, to_zval_bool, to_xml_bool},
{{XSD_DECIMAL, XSD_DECIMAL_STRING, XSD_1999_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_string},
{{XSD_FLOAT, XSD_FLOAT_STRING, XSD_1999_NAMESPACE, NULL, NULL}, to_zval_double, to_xml_double},
{{XSD_DOUBLE, XSD_DOUBLE_STRING, XSD_1999_NAMESPACE, NULL, NULL}, to_zval_double, to_xml_double},
{{XSD_LONG, XSD_LONG_STRING, XSD_1999_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{XSD_INT, XSD_INT_STRING, XSD_1999_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{XSD_SHORT, XSD_SHORT_STRING, XSD_1999_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{XSD_BYTE, XSD_BYTE_STRING, XSD_1999_NAMESPACE, NULL}, to_zval_long, to_xml_long},
{{XSD_1999_TIMEINSTANT, XSD_1999_TIMEINSTANT_STRING, XSD_1999_NAMESPACE, NULL}, to_zval_stringc, to_xml_string},
{{XSD_LONG, XSD_LONG_STRING, XSD_1999_NAMESPACE, NULL, NULL}, to_zval_long, to_xml_long},
{{XSD_INT, XSD_INT_STRING, XSD_1999_NAMESPACE, NULL, NULL}, to_zval_long, to_xml_long},
{{XSD_SHORT, XSD_SHORT_STRING, XSD_1999_NAMESPACE, NULL, NULL}, to_zval_long, to_xml_long},
{{XSD_BYTE, XSD_BYTE_STRING, XSD_1999_NAMESPACE, NULL, NULL}, to_zval_long, to_xml_long},
{{XSD_1999_TIMEINSTANT, XSD_1999_TIMEINSTANT_STRING, XSD_1999_NAMESPACE, NULL, NULL}, to_zval_stringc, to_xml_string},
{{XSD_ANYXML, "<anyXML>", "<anyXML>", NULL}, to_zval_any, to_xml_any},
{{XSD_ANYXML, "<anyXML>", "<anyXML>", NULL, NULL}, to_zval_any, to_xml_any},
{{END_KNOWN_TYPES, NULL, NULL, NULL}, guess_zval_convert, guess_xml_convert}
{{END_KNOWN_TYPES, NULL, NULL, NULL, NULL}, guess_zval_convert, guess_xml_convert}
};
int numDefaultEncodings = sizeof(defaultEncoding)/sizeof(encode);
@ -784,7 +784,7 @@ static zval *to_zval_base64(zval *ret, encodeTypePtr type, xmlNodePtr data)
static zval *to_zval_hexbin(zval *ret, encodeTypePtr type, xmlNodePtr data)
{
zend_string *str;
int i, j;
size_t i, j;
unsigned char c;
ZVAL_NULL(ret);
@ -945,7 +945,7 @@ static xmlNodePtr to_xml_hexbin(encodeTypePtr type, zval *data, int style, xmlNo
xmlNodePtr ret, text;
unsigned char *str;
zval tmp;
int i, j;
size_t i, j;
ret = xmlNewNode(NULL, BAD_CAST("BOGUS"));
xmlAddChild(parent, ret);
@ -2427,7 +2427,7 @@ iterator_done:
smart_str_0(&array_type);
set_ns_prop(xmlParam, SOAP_1_1_ENC_NAMESPACE, "arrayType", ZSTR_VAL(array_type.s));
} else {
int i = 0;
size_t i = 0;
while (i < ZSTR_LEN(array_size.s)) {
if (ZSTR_VAL(array_size.s)[i] == ',') {ZSTR_VAL(array_size.s)[i] = ' ';}
++i;
@ -3478,7 +3478,7 @@ static int is_map(zval *array)
{
zend_ulong index;
zend_string *key;
int i = 0;
zend_ulong i = 0;
ZEND_HASH_FOREACH_KEY(Z_ARRVAL_P(array), index, key) {
if (key || index != i) {

View File

@ -336,7 +336,7 @@ int make_http_soap_request(zval *this_ptr,
zend_string *request;
smart_str soap_headers = {0};
smart_str soap_headers_z = {0};
int err;
size_t err;
php_url *phpurl = NULL;
php_stream *stream;
zval *trace, *tmp;
@ -980,10 +980,10 @@ try_again:
sempos = strstr(options, ";");
if (strstr(options,"path=") == options) {
eqpos = options + sizeof("path=")-1;
add_index_stringl(&zcookie, 1, eqpos, sempos?(sempos-eqpos):strlen(eqpos));
add_index_stringl(&zcookie, 1, eqpos, sempos?(size_t)(sempos-eqpos):strlen(eqpos));
} else if (strstr(options,"domain=") == options) {
eqpos = options + sizeof("domain=")-1;
add_index_stringl(&zcookie, 2, eqpos, sempos?(sempos-eqpos):strlen(eqpos));
add_index_stringl(&zcookie, 2, eqpos, sempos?(size_t)(sempos-eqpos):strlen(eqpos));
} else if (strstr(options,"secure") == options) {
add_index_bool(&zcookie, 3, 1);
}

View File

@ -1160,7 +1160,8 @@ zend_object_iterator_funcs spl_array_it_funcs = {
spl_array_it_get_current_data,
spl_array_it_get_current_key,
spl_array_it_move_forward,
spl_array_it_rewind
spl_array_it_rewind,
NULL
};
zend_object_iterator *spl_array_get_iterator(zend_class_entry *ce, zval *object, int by_ref) /* {{{ */
@ -1376,7 +1377,7 @@ SPL_METHOD(Array, seek)
zend_throw_exception_ex(spl_ce_OutOfBoundsException, 0, "Seek position " ZEND_LONG_FMT " is out of range", opos);
} /* }}} */
int static spl_array_object_count_elements_helper(spl_array_object *intern, zend_long *count) /* {{{ */
static int spl_array_object_count_elements_helper(spl_array_object *intern, zend_long *count) /* {{{ */
{
HashTable *aht = spl_array_get_hash_table(intern);
HashPosition pos, *pos_ptr;

View File

@ -676,7 +676,8 @@ void spl_filesystem_object_construct(INTERNAL_FUNCTION_PARAMETERS, zend_long cto
{
spl_filesystem_object *intern;
char *path;
size_t parsed, len;
int parsed;
size_t len;
zend_long flags;
zend_error_handling error_handling;
@ -1608,7 +1609,8 @@ zend_object_iterator_funcs spl_filesystem_dir_it_funcs = {
spl_filesystem_dir_it_current_data,
spl_filesystem_dir_it_current_key,
spl_filesystem_dir_it_move_forward,
spl_filesystem_dir_it_rewind
spl_filesystem_dir_it_rewind,
NULL
};
/* }}} */
@ -1806,7 +1808,8 @@ zend_object_iterator_funcs spl_filesystem_tree_it_funcs = {
spl_filesystem_tree_it_current_data,
spl_filesystem_tree_it_current_key,
spl_filesystem_tree_it_move_forward,
spl_filesystem_tree_it_rewind
spl_filesystem_tree_it_rewind,
NULL
};
/* }}} */

View File

@ -1291,7 +1291,8 @@ zend_object_iterator_funcs spl_dllist_it_funcs = {
spl_dllist_it_get_current_data,
spl_dllist_it_get_current_key,
spl_dllist_it_move_forward,
spl_dllist_it_rewind
spl_dllist_it_rewind,
NULL
}; /* }}} */
zend_object_iterator *spl_dllist_get_iterator(zend_class_entry *ce, zval *object, int by_ref) /* {{{ */

View File

@ -1018,7 +1018,8 @@ zend_object_iterator_funcs spl_fixedarray_it_funcs = {
spl_fixedarray_it_get_current_data,
spl_fixedarray_it_get_current_key,
spl_fixedarray_it_move_forward,
spl_fixedarray_it_rewind
spl_fixedarray_it_rewind,
NULL
};
zend_object_iterator *spl_fixedarray_get_iterator(zend_class_entry *ce, zval *object, int by_ref) /* {{{ */

View File

@ -1069,7 +1069,8 @@ zend_object_iterator_funcs spl_heap_it_funcs = {
spl_heap_it_get_current_data,
spl_heap_it_get_current_key,
spl_heap_it_move_forward,
spl_heap_it_rewind
spl_heap_it_rewind,
NULL
};
zend_object_iterator_funcs spl_pqueue_it_funcs = {
@ -1078,7 +1079,8 @@ zend_object_iterator_funcs spl_pqueue_it_funcs = {
spl_pqueue_it_get_current_data,
spl_heap_it_get_current_key,
spl_heap_it_move_forward,
spl_heap_it_rewind
spl_heap_it_rewind,
NULL
};
zend_object_iterator *spl_heap_get_iterator(zend_class_entry *ce, zval *object, int by_ref) /* {{{ */
@ -1153,11 +1155,11 @@ ZEND_END_ARG_INFO()
static const zend_function_entry spl_funcs_SplMinHeap[] = {
SPL_ME(SplMinHeap, compare, arginfo_heap_compare, ZEND_ACC_PROTECTED)
{NULL, NULL, NULL}
PHP_FE_END
};
static const zend_function_entry spl_funcs_SplMaxHeap[] = {
SPL_ME(SplMaxHeap, compare, arginfo_heap_compare, ZEND_ACC_PROTECTED)
{NULL, NULL, NULL}
PHP_FE_END
};
static const zend_function_entry spl_funcs_SplPriorityQueue[] = {
@ -1176,7 +1178,7 @@ static const zend_function_entry spl_funcs_SplPriorityQueue[] = {
SPL_ME(SplHeap, valid, arginfo_splheap_void, ZEND_ACC_PUBLIC)
SPL_ME(SplHeap, recoverFromCorruption, arginfo_splheap_void, ZEND_ACC_PUBLIC)
SPL_ME(SplHeap, isCorrupted, arginfo_splheap_void, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
PHP_FE_END
};
static const zend_function_entry spl_funcs_SplHeap[] = {
@ -1193,7 +1195,7 @@ static const zend_function_entry spl_funcs_SplHeap[] = {
SPL_ME(SplHeap, recoverFromCorruption, arginfo_splheap_void, ZEND_ACC_PUBLIC)
SPL_ME(SplHeap, isCorrupted, arginfo_splheap_void, ZEND_ACC_PUBLIC)
ZEND_FENTRY(compare, NULL, NULL, ZEND_ACC_PROTECTED|ZEND_ACC_ABSTRACT)
{NULL, NULL, NULL}
PHP_FE_END
};
/* }}} */

View File

@ -466,7 +466,8 @@ zend_object_iterator_funcs spl_recursive_it_iterator_funcs = {
spl_recursive_it_get_current_data,
spl_recursive_it_get_current_key,
spl_recursive_it_move_forward,
spl_recursive_it_rewind
spl_recursive_it_rewind,
NULL
};
static void spl_recursive_it_it_construct(INTERNAL_FUNCTION_PARAMETERS, zend_class_entry *ce_base, zend_class_entry *ce_inner, recursive_it_it_type rit_type)

View File

@ -51,7 +51,7 @@ ZEND_END_ARG_INFO();
static const zend_function_entry spl_funcs_SplObserver[] = {
SPL_ABSTRACT_ME(SplObserver, update, arginfo_SplObserver_update)
{NULL, NULL, NULL}
PHP_FE_END
};
ZEND_BEGIN_ARG_INFO(arginfo_SplSubject_attach, 0)
@ -69,7 +69,7 @@ static const zend_function_entry spl_funcs_SplSubject[] = {
SPL_ABSTRACT_ME(SplSubject, attach, arginfo_SplSubject_attach)
SPL_ABSTRACT_ME(SplSubject, detach, arginfo_SplSubject_attach)
SPL_ABSTRACT_ME(SplSubject, notify, arginfo_SplSubject_void)
{NULL, NULL, NULL}
PHP_FE_END
};
PHPAPI zend_class_entry *spl_ce_SplObserver;
@ -924,7 +924,7 @@ static const zend_function_entry spl_funcs_SplObjectStorage[] = {
SPL_MA(SplObjectStorage, offsetSet, SplObjectStorage, attach, arginfo_attach, 0)
SPL_MA(SplObjectStorage, offsetUnset, SplObjectStorage, detach, arginfo_offsetGet, 0)
SPL_ME(SplObjectStorage, offsetGet, arginfo_offsetGet, 0)
{NULL, NULL, NULL}
PHP_FE_END
};
typedef enum {
@ -1233,7 +1233,7 @@ static const zend_function_entry spl_funcs_MultipleIterator[] = {
SPL_ME(MultipleIterator, key, arginfo_splobject_void, 0)
SPL_ME(MultipleIterator, current, arginfo_splobject_void, 0)
SPL_ME(MultipleIterator, next, arginfo_splobject_void, 0)
{NULL, NULL, NULL}
PHP_FE_END
};
/* {{{ PHP_MINIT_FUNCTION(spl_observer) */

View File

@ -1169,7 +1169,8 @@ static php_stream_ops php_stream_sqlite3_ops = {
"SQLite3",
php_sqlite3_stream_seek,
php_sqlite3_stream_cast,
php_sqlite3_stream_stat
php_sqlite3_stream_stat,
NULL
};
/* {{{ proto resource SQLite3::openBlob(string table, string column, int rowid [, string dbname])

View File

@ -110,7 +110,7 @@ static const zend_function_entry php_dir_class_functions[] = {
PHP_FALIAS(close, closedir, arginfo_dir)
PHP_FALIAS(rewind, rewinddir, arginfo_dir)
PHP_NAMED_FE(read, php_if_readdir, arginfo_dir)
{NULL, NULL, NULL}
PHP_FE_END
};

View File

@ -568,7 +568,7 @@ static const zend_function_entry xmlwriter_class_functions[] = {
#endif
PHP_ME_MAPPING(outputMemory, xmlwriter_output_memory, arginfo_xmlwriter_method_output_memory, 0)
PHP_ME_MAPPING(flush, xmlwriter_flush, arginfo_xmlwriter_method_flush, 0)
{NULL, NULL, NULL}
PHP_FE_END
};
/* }}} */
@ -695,7 +695,8 @@ static void php_xmlwriter_string_arg(INTERNAL_FUNCTION_PARAMETERS, xmlwriter_rea
xmlwriter_object *intern;
xmlTextWriterPtr ptr;
char *name;
size_t name_len, retval;
size_t name_len;
int retval;
zval *self = getThis();
@ -1581,7 +1582,8 @@ static PHP_FUNCTION(xmlwriter_start_dtd_entity)
xmlwriter_object *intern;
xmlTextWriterPtr ptr;
char *name;
size_t name_len, retval;
size_t name_len;
int retval;
zend_bool isparm;
zval *self = getThis();

View File

@ -100,7 +100,7 @@ const zend_function_entry php_xsl_xsltprocessor_class_functions[] = {
PHP_FALIAS(setProfiling, xsl_xsltprocessor_set_profiling, arginfo_xsl_xsltprocessor_set_profiling)
PHP_FALIAS(setSecurityPrefs, xsl_xsltprocessor_set_security_prefs, arginfo_xsl_xsltprocessor_set_security_prefs)
PHP_FALIAS(getSecurityPrefs, xsl_xsltprocessor_get_security_prefs, arginfo_xsl_xsltprocessor_get_security_prefs)
{NULL, NULL, NULL}
PHP_FE_END
};
/* {{{ php_xsl_xslt_string_to_xpathexpr()
@ -138,7 +138,6 @@ static char **php_xsl_xslt_make_params(HashTable *parht, int xpath_params)
zval *value;
char *xpath_expr;
zend_string *string_key;
zend_ulong num_key;
char **params = NULL;
int i = 0;
@ -146,7 +145,7 @@ static char **php_xsl_xslt_make_params(HashTable *parht, int xpath_params)
params = (char **)safe_emalloc((2 * zend_hash_num_elements(parht) + 1), sizeof(char *), 0);
memset((char *)params, 0, parsize);
ZEND_HASH_FOREACH_KEY_VAL(parht, num_key, string_key, value) {
ZEND_HASH_FOREACH_STR_KEY_VAL(parht, string_key, value) {
if (string_key == NULL) {
php_error_docref(NULL, E_WARNING, "Invalid argument or parameter array");
efree(params);
@ -266,10 +265,10 @@ static void xsl_ext_function_php(xmlXPathParserContextPtr ctxt, int nargs, int t
nsparent = node->_private;
curns = xmlNewNs(NULL, node->name, NULL);
if (node->children) {
curns->prefix = xmlStrdup((char *)node->children);
curns->prefix = xmlStrdup((xmlChar *)node->children);
}
if (node->children) {
node = xmlNewDocNode(node->doc, NULL, (char *) node->children, node->name);
node = xmlNewDocNode(node->doc, NULL, (xmlChar *) node->children, node->name);
} else {
node = xmlNewDocNode(node->doc, NULL, (const xmlChar *) "xmlns", node->name);
}

View File

@ -499,7 +499,7 @@ int php_zip_glob(char *pattern, int pattern_len, zend_long flags, zval *return_v
char *result;
#endif
glob_t globbuf;
int n;
uint n;
int ret;
if (pattern_len >= MAXPATHLEN) {
@ -3003,7 +3003,7 @@ static const zend_function_entry zip_class_functions[] = {
ZIPARCHIVE_ME(getExternalAttributesIndex, arginfo_ziparchive_getextattrindex, ZEND_ACC_PUBLIC)
ZIPARCHIVE_ME(setCompressionName, arginfo_ziparchive_setcompname, ZEND_ACC_PUBLIC)
ZIPARCHIVE_ME(setCompressionIndex, arginfo_ziparchive_setcompindex, ZEND_ACC_PUBLIC)
{NULL, NULL, NULL}
PHP_FE_END
};
/* }}} */

View File

@ -347,7 +347,8 @@ static php_stream_wrapper_ops zip_stream_wops = {
NULL, /* unlink */
NULL, /* rename */
NULL, /* mkdir */
NULL /* rmdir */
NULL, /* rmdir */
NULL
};
php_stream_wrapper php_stream_zip_wrapper = {

View File

@ -761,7 +761,7 @@ static zend_bool zlib_create_dictionary_string(HashTable *options, char **dict,
switch (Z_TYPE_P(option_buffer)) {
case IS_STRING: {
zend_string *str = Z_STR_P(option_buffer);
int i;
size_t i;
zend_bool last_null = 1;
for (i = 0; i < ZSTR_LEN(str); i++) {
@ -794,7 +794,7 @@ static zend_bool zlib_create_dictionary_string(HashTable *options, char **dict,
zend_string **end, **ptr = strings - 1;
ZEND_HASH_FOREACH_VAL(dictionary, cur) {
int i;
size_t i;
*++ptr = zval_get_string(cur);
if (!*ptr || ZSTR_LEN(*ptr) == 0) {

View File

@ -172,7 +172,8 @@ static php_stream_wrapper_ops gzip_stream_wops = {
NULL, /* unlink */
NULL, /* rename */
NULL, /* mkdir */
NULL /* rmdir */
NULL, /* rmdir */
NULL
};
php_stream_wrapper php_stream_gzip_wrapper = {