I've been working on making PHP build under more stringent error checking, specifically -Wextra under GCC. This patch cleans up dozens of struct initializations that are valid C, but could hide future problems.
xoxo, Andy -- Andy Lester => [EMAIL PROTECTED] => www.petdance.com => AIM:petdance
Index: ext/standard/string.c =================================================================== --- ext/standard/string.c (revision 5) +++ ext/standard/string.c (working copy) @@ -892,12 +892,12 @@ { zval **tmp; HashPosition pos; - smart_str implstr = {0}; - int numelems, i = 0; + smart_str implstr = {NULL, 0, 0}; + int i = 0; zval tmp_val; int str_len; - numelems = zend_hash_num_elements(Z_ARRVAL_P(arr)); + const int numelems = zend_hash_num_elements(Z_ARRVAL_P(arr)); if (numelems == 0) { RETURN_EMPTY_STRING(); @@ -2536,7 +2536,7 @@ int maxlen = 0, pos, len, found; char *key; HashPosition hpos; - smart_str result = {0}; + smart_str result = {NULL, 0, 0}; HashTable tmp_hash; zend_hash_init(&tmp_hash, zend_hash_num_elements(hash), NULL, NULL, 0); Index: ext/standard/basic_functions.c =================================================================== --- ext/standard/basic_functions.c (revision 5) +++ ext/standard/basic_functions.c (working copy) @@ -3745,7 +3745,7 @@ PHP_FE(sys_get_temp_dir, arginfo_sys_get_temp_dir) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; /* }}} */ @@ -3786,7 +3786,7 @@ static const zend_module_dep standard_deps[] = { /* {{{ */ ZEND_MOD_OPTIONAL("session") - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0} }; /* }}} */ @@ -5474,7 +5474,7 @@ char *filename; int filename_len; zend_lex_state original_lex_state; - zend_file_handle file_handle = {0}; + zend_file_handle file_handle = {0, NULL, NULL, {0}, 0}; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s", &filename, &filename_len) == FAILURE) { RETURN_FALSE; Index: ext/standard/dir.c =================================================================== --- ext/standard/dir.c (revision 5) +++ ext/standard/dir.c (working copy) @@ -97,7 +97,7 @@ PHP_FALIAS(close, closedir, NULL) PHP_FALIAS(rewind, rewinddir, NULL) PHP_NAMED_FE(read, php_if_readdir, NULL) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; Index: ext/standard/var.c =================================================================== --- ext/standard/var.c (revision 5) +++ ext/standard/var.c (working copy) @@ -832,7 +832,7 @@ { zval **struc; php_serialize_data_t var_hash; - smart_str buf = {0}; + smart_str buf = {NULL, 0, 0}; if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &struc) == FAILURE) { WRONG_PARAM_COUNT; Index: ext/standard/http_fopen_wrapper.c =================================================================== --- ext/standard/http_fopen_wrapper.c (revision 5) +++ ext/standard/http_fopen_wrapper.c (working copy) @@ -188,7 +188,7 @@ efree(transport_string); if (stream && use_proxy && use_ssl) { - smart_str header = {0}; + smart_str header = {NULL, 0, 0}; smart_str_appendl(&header, "CONNECT ", sizeof("CONNECT ")-1); smart_str_appends(&header, resource->host); @@ -738,7 +738,9 @@ PHPAPI php_stream_wrapper php_stream_http_wrapper = { &http_stream_wops, NULL, - 1 /* is_url */ + 1, /* is_url */ + 0, + NULL }; /* Index: ext/standard/php_fopen_wrapper.c =================================================================== --- ext/standard/php_fopen_wrapper.c (revision 5) +++ ext/standard/php_fopen_wrapper.c (working copy) @@ -319,6 +319,8 @@ &php_stdio_wops, NULL, 0, /* is_url */ + 0, + NULL }; @@ -327,6 +329,6 @@ * tab-width: 4 * c-basic-offset: 4 * End: - * vim600: sw=4 ts=4 fdm=marker - * vim<600: sw=4 ts=4 + * vim600: noet sw=4 ts=4 fdm=marker + * vim<600: noet sw=4 ts=4 */ Index: ext/standard/http.c =================================================================== --- ext/standard/http.c (revision 5) +++ ext/standard/http.c (working copy) @@ -195,7 +195,7 @@ zval *formdata; char *prefix = NULL, *arg_sep=NULL; int arg_sep_len, prefix_len = 0; - smart_str formstr = {0}; + smart_str formstr = {NULL, 0, 0}; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "z|ss", &formdata, &prefix, &prefix_len, &arg_sep, &arg_sep_len) != SUCCESS) { Index: ext/standard/ftp_fopen_wrapper.c =================================================================== --- ext/standard/ftp_fopen_wrapper.c (revision 5) +++ ext/standard/ftp_fopen_wrapper.c (working copy) @@ -1162,7 +1162,9 @@ PHPAPI php_stream_wrapper php_stream_ftp_wrapper = { &ftp_stream_wops, NULL, - 1 /* is_url */ + 1, /* is_url */ + 0, + NULL }; Index: ext/standard/user_filters.c =================================================================== --- ext/standard/user_filters.c (revision 5) +++ ext/standard/user_filters.c (working copy) @@ -74,7 +74,7 @@ PHP_NAMED_FE(filter, PHP_FN(user_filter_nop), arginfo_php_user_filter_filter) PHP_NAMED_FE(onCreate, PHP_FN(user_filter_nop), arginfo_php_user_filter_onCreate) PHP_NAMED_FE(onClose, PHP_FN(user_filter_nop), arginfo_php_user_filter_onClose) - { NULL, NULL, NULL } + { NULL, NULL, NULL, 0, 0 } }; static zend_class_entry user_filter_class_entry; Index: ext/standard/url_scanner_ex.c =================================================================== --- ext/standard/url_scanner_ex.c (revision 5) +++ ext/standard/url_scanner_ex.c (working copy) @@ -875,9 +875,9 @@ char *php_url_scanner_adapt_single_url(const char *url, size_t urllen, const char *name, const char *value, size_t *newlen TSRMLS_DC) { - smart_str surl = {0}; - smart_str buf = {0}; - smart_str url_app = {0}; + smart_str surl = {NULL, 0, 0}; + smart_str buf = {NULL, 0, 0}; + smart_str url_app = {NULL, 0, 0}; smart_str_setl(&surl, url, urllen); Index: ext/standard/head.c =================================================================== --- ext/standard/head.c (revision 5) +++ ext/standard/head.c (working copy) @@ -40,7 +40,7 @@ PHP_FUNCTION(header) { zend_bool rep = 1; - sapi_header_line ctr = {0}; + sapi_header_line ctr = {NULL, 0, 0}; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|bl", &ctr.line, &ctr.line_len, &rep, &ctr.response_code) == FAILURE) @@ -65,7 +65,7 @@ char *cookie, *encoded_value = NULL; int len=sizeof("Set-Cookie: "); char *dt; - sapi_header_line ctr = {0}; + sapi_header_line ctr = {NULL, 0, 0}; int result; if (name && strpbrk(name, "=,; \t\r\n\013\014") != NULL) { /* man isspace for \013 and \014 */ @@ -103,7 +103,7 @@ * so in order to force cookies to be deleted, even on MSIE, we * pick an expiry date 1 year and 1 second in the past */ - time_t t = time(NULL) - 31536001; + const time_t t = time(NULL) - 31536001; dt = php_format_date("D, d-M-Y H:i:s T", sizeof("D, d-M-Y H:i:s T")-1, t, 0 TSRMLS_CC); snprintf(cookie, len + 100, "Set-Cookie: %s=deleted; expires=%s", name, dt); efree(dt); Index: ext/standard/html.c =================================================================== --- ext/standard/html.c (revision 5) +++ ext/standard/html.c (working copy) @@ -410,11 +410,11 @@ { cs_8859_5, 0xc0, 0xff, ent_iso_8859_5 }, { cs_cp866, 0xc0, 0xff, ent_cp_866 }, { cs_macroman, 0x0b, 0xff, ent_macroman }, - { cs_terminator } + { cs_terminator, 0, 0, NULL } }; static const struct { - const char *codeset; + const char * const codeset; enum entity_charset charset; } charset_map[] = { { "ISO-8859-1", cs_8859_1 }, @@ -447,7 +447,7 @@ { "866", cs_cp866 }, { "ibm866", cs_cp866 }, { "MacRoman", cs_macroman }, - { NULL } + { NULL, 0 } }; static const struct { Index: ext/standard/file.c =================================================================== --- ext/standard/file.c (revision 5) +++ ext/standard/file.c (working copy) @@ -1907,7 +1907,7 @@ int delimiter_str_len, enclosure_str_len; HashPosition pos; int count, i = 0; - smart_str csvline = {0}; + smart_str csvline = {NULL, 0, 0}; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ra|ss", &fp, &fields, &delimiter_str, &delimiter_str_len, @@ -1957,8 +1957,8 @@ FPUTCSV_FLD_CHK('\t') || FPUTCSV_FLD_CHK(' ') ) { - char *ch = Z_STRVAL_PP(field); - char *end = ch + Z_STRLEN_PP(field); + const char *ch = Z_STRVAL_PP(field); + const char * const end = ch + Z_STRLEN_PP(field); int escaped = 0; smart_str_appendc(&csvline, enclosure); @@ -1990,7 +1990,7 @@ if (!PG(magic_quotes_runtime)) { ret = php_stream_write(stream, csvline.c, csvline.len); } else { - char *buffer = estrndup(csvline.c, csvline.len); + char * const buffer = estrndup(csvline.c, csvline.len); int len = csvline.len; php_stripslashes(buffer, &len TSRMLS_CC); ret = php_stream_write(stream, buffer, len); Index: ext/ereg/ereg.c =================================================================== --- ext/ereg/ereg.c (revision 5) +++ ext/ereg/ereg.c (working copy) @@ -84,7 +84,7 @@ PHP_FE(split, arginfo_split) PHP_FE(spliti, arginfo_spliti) PHP_FE(sql_regcase, arginfo_sql_regcase) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; /* }}} */ Index: ext/pcre/php_pcre.c =================================================================== --- ext/pcre/php_pcre.c (revision 5) +++ ext/pcre/php_pcre.c (working copy) @@ -857,7 +857,7 @@ int result_len; /* Length of the result of the evaluation */ int backref; /* Current backref */ char *compiled_string_description; - smart_str code = {0}; + smart_str code = {NULL, 0, 0}; eval_str_end = eval_str + eval_str_len; walk = segment = eval_str; @@ -1798,7 +1798,7 @@ PHP_FE(preg_quote, NULL) PHP_FE(preg_grep, NULL) PHP_FE(preg_last_error, NULL) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; zend_module_entry pcre_module_entry = { Index: ext/date/php_date.c =================================================================== --- ext/date/php_date.c (revision 5) +++ ext/date/php_date.c (working copy) @@ -195,7 +195,7 @@ PHP_FE(date_sunrise, arginfo_date_sunrise) PHP_FE(date_sunset, arginfo_date_sunset) PHP_FE(date_sun_info, arginfo_date_sun_info) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; const zend_function_entry date_funcs_date[] = { @@ -208,7 +208,7 @@ PHP_ME_MAPPING(setTime, date_time_set, NULL, 0) PHP_ME_MAPPING(setDate, date_date_set, NULL, 0) PHP_ME_MAPPING(setISODate, date_isodate_set, NULL, 0) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; const zend_function_entry date_funcs_timezone[] = { @@ -218,7 +218,7 @@ PHP_ME_MAPPING(getTransitions, timezone_transitions_get, NULL, 0) PHP_ME_MAPPING(listAbbreviations, timezone_abbreviations_list, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) PHP_ME_MAPPING(listIdentifiers, timezone_identifiers_list, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; static void date_register_classes(TSRMLS_D); @@ -304,7 +304,7 @@ /* This is need to ensure that session extension request shutdown occurs 1st, because it uses the date extension */ static const zend_module_dep date_deps[] = { ZEND_MOD_OPTIONAL("session") - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0} }; /* {{{ Module struct */ @@ -715,7 +715,7 @@ /* {{{ date_format - (gm)date helper */ static char *date_format(char *format, int format_len, timelib_time *t, int localtime) { - smart_str string = {0}; + smart_str string = {NULL, 0, 0}; int i, length; char buffer[33]; timelib_time_offset *offset = NULL; Index: ext/reflection/php_reflection.c =================================================================== --- ext/reflection/php_reflection.c (revision 5) +++ ext/reflection/php_reflection.c (working copy) @@ -4416,7 +4416,7 @@ /* {{{ method tables */ static const zend_function_entry reflection_exception_functions[] = { - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; @@ -4434,13 +4434,13 @@ static const zend_function_entry reflection_functions[] = { ZEND_ME(reflection, getModifierNames, arginfo_reflection_getModifierNames, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) ZEND_ME(reflection, export, arginfo_reflection_export, ZEND_ACC_PUBLIC|ZEND_ACC_STATIC) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; static const zend_function_entry reflector_functions[] = { ZEND_FENTRY(export, NULL, NULL, ZEND_ACC_STATIC|ZEND_ACC_ABSTRACT|ZEND_ACC_PUBLIC) ZEND_ABSTRACT_ME(reflector, __toString, NULL) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; static @@ -4482,7 +4482,7 @@ ZEND_ME(reflection_function, getExtension, NULL, 0) ZEND_ME(reflection_function, getExtensionName, NULL, 0) ZEND_ME(reflection_function, isDeprecated, NULL, 0) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; static const zend_function_entry reflection_function_functions[] = { @@ -4492,7 +4492,7 @@ ZEND_ME(reflection_function, isDisabled, NULL, 0) ZEND_ME(reflection_function, invoke, arginfo_reflection_function_invoke, 0) ZEND_ME(reflection_function, invokeArgs, arginfo_reflection_function_invokeArgs, 0) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; static @@ -4537,7 +4537,7 @@ ZEND_ME(reflection_method, invokeArgs, arginfo_reflection_method_invokeArgs, 0) ZEND_ME(reflection_method, getDeclaringClass, NULL, 0) ZEND_ME(reflection_method, getPrototype, NULL, 0) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; @@ -4671,7 +4671,7 @@ ZEND_ME(reflection_class, implementsInterface, arginfo_reflection_class_implementsInterface, 0) ZEND_ME(reflection_class, getExtension, NULL, 0) ZEND_ME(reflection_class, getExtensionName, NULL, 0) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; @@ -4689,7 +4689,7 @@ static const zend_function_entry reflection_object_functions[] = { ZEND_ME(reflection_object, export, arginfo_reflection_object_export, ZEND_ACC_STATIC|ZEND_ACC_PUBLIC) ZEND_ME(reflection_object, __construct, arginfo_reflection_object___construct, 0) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; @@ -4731,7 +4731,7 @@ ZEND_ME(reflection_property, getModifiers, NULL, 0) ZEND_ME(reflection_property, getDeclaringClass, NULL, 0) ZEND_ME(reflection_property, getDocComment, NULL, 0) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; static @@ -4763,7 +4763,7 @@ ZEND_ME(reflection_parameter, isOptional, NULL, 0) ZEND_ME(reflection_parameter, isDefaultValueAvailable, NULL, 0) ZEND_ME(reflection_parameter, getDefaultValue, NULL, 0) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; static @@ -4791,12 +4791,12 @@ ZEND_ME(reflection_extension, getClassNames, NULL, 0) ZEND_ME(reflection_extension, getDependencies, NULL, 0) ZEND_ME(reflection_extension, info, NULL, 0) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; /* }}} */ const zend_function_entry reflection_ext_functions[] = { /* {{{ */ - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; /* }}} */ static zend_object_handlers *zend_std_obj_handlers; Index: Zend/zend_objects_API.c =================================================================== --- Zend/zend_objects_API.c (revision 5) +++ Zend/zend_objects_API.c (working copy) @@ -381,6 +381,7 @@ NULL, /* compare_objects */ NULL, /* cast_object */ NULL, /* count_elements */ + NULL, /* get debug info */ }; Index: Zend/zend_builtin_functions.c =================================================================== --- Zend/zend_builtin_functions.c (revision 5) +++ Zend/zend_builtin_functions.c (working copy) @@ -94,7 +94,7 @@ ZEND_FE(func_num_args, NULL) ZEND_FE(func_get_arg, NULL) ZEND_FE(func_get_args, NULL) - { "strlen", zend_if_strlen, NULL }, + { "strlen", zend_if_strlen, NULL, 0, 0 }, ZEND_FE(strcmp, NULL) ZEND_FE(strncmp, NULL) ZEND_FE(strcasecmp, NULL) @@ -148,7 +148,7 @@ ZEND_FE(zend_thread_id, NULL) #endif #endif - { NULL, NULL, NULL } + { NULL, NULL, NULL, 0, 0 } }; Index: Zend/zend_interfaces.c =================================================================== --- Zend/zend_interfaces.c (revision 5) +++ Zend/zend_interfaces.c (working copy) @@ -479,7 +479,7 @@ /* {{{ function tables */ const zend_function_entry zend_funcs_aggregate[] = { ZEND_ABSTRACT_ME(iterator, getIterator, NULL) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; const zend_function_entry zend_funcs_iterator[] = { @@ -488,7 +488,7 @@ ZEND_ABSTRACT_ME(iterator, key, NULL) ZEND_ABSTRACT_ME(iterator, valid, NULL) ZEND_ABSTRACT_ME(iterator, rewind, NULL) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; const zend_function_entry *zend_funcs_traversable = NULL; @@ -514,7 +514,7 @@ ZEND_ABSTRACT_ME(arrayaccess, offsetGet, arginfo_arrayaccess_offset_get) ZEND_ABSTRACT_ME(arrayaccess, offsetSet, arginfo_arrayaccess_offset_value) ZEND_ABSTRACT_ME(arrayaccess, offsetUnset, arginfo_arrayaccess_offset) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; static @@ -525,7 +525,7 @@ const zend_function_entry zend_funcs_serializable[] = { ZEND_ABSTRACT_ME(serializable, serialize, NULL) ZEND_FENTRY(unserialize, NULL, arginfo_serializable_serialize, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT|ZEND_ACC_CTOR) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; /* }}} */ Index: Zend/zend_API.c =================================================================== --- Zend/zend_API.c (revision 5) +++ Zend/zend_API.c (working copy) @@ -2242,7 +2242,7 @@ static zend_function_entry disabled_function[] = { ZEND_FE(display_disabled_function, NULL) - { NULL, NULL, NULL } + { NULL, NULL, NULL, 0, 0 } }; ZEND_API int zend_disable_function(char *function_name, uint function_name_length TSRMLS_DC) /* {{{ */ @@ -2268,7 +2268,7 @@ /* }}} */ static const zend_function_entry disabled_class_new[] = { - { NULL, NULL, NULL } + { NULL, NULL, NULL, 0, 0 } }; ZEND_API int zend_disable_class(char *class_name, uint class_name_length TSRMLS_DC) /* {{{ */ Index: Zend/zend_iterators.c =================================================================== --- Zend/zend_iterators.c (revision 5) +++ Zend/zend_iterators.c (working copy) @@ -45,7 +45,8 @@ NULL, /* get class name */ NULL, /* compare */ NULL, /* cast */ - NULL /* count */ + NULL, /* count */ + NULL /* get debug info */ }; ZEND_API void zend_register_iterator_wrapper(TSRMLS_D) Index: Zend/zend_exceptions.c =================================================================== --- Zend/zend_exceptions.c (revision 5) +++ Zend/zend_exceptions.c (working copy) @@ -534,7 +534,7 @@ ZEND_ARG_INFO(0, code) ZEND_END_ARG_INFO() -const static zend_function_entry default_exception_functions[] = { +static const zend_function_entry default_exception_functions[] = { ZEND_ME(exception, __clone, NULL, ZEND_ACC_PRIVATE|ZEND_ACC_FINAL) ZEND_ME(exception, __construct, arginfo_exception___construct, ZEND_ACC_PUBLIC) ZEND_ME(exception, getMessage, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) @@ -544,7 +544,7 @@ ZEND_ME(exception, getTrace, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) ZEND_ME(exception, getTraceAsString, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) ZEND_ME(exception, __toString, NULL, 0) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; static @@ -559,7 +559,7 @@ static const zend_function_entry error_exception_functions[] = { ZEND_ME(error_exception, __construct, arginfo_error_exception___construct, ZEND_ACC_PUBLIC) ZEND_ME(error_exception, getSeverity, NULL, ZEND_ACC_PUBLIC|ZEND_ACC_FINAL) - {NULL, NULL, NULL} + {NULL, NULL, NULL, 0, 0} }; /* }}} */ Index: Zend/zend_alloc.c =================================================================== --- Zend/zend_alloc.c (revision 5) +++ Zend/zend_alloc.c (working copy) @@ -298,7 +298,7 @@ #ifdef HAVE_MEM_MMAP_ZERO ZEND_MM_MEM_MMAP_ZERO_DSC, #endif - {NULL, NULL, NULL, NULL, NULL, NULL} + {NULL, NULL, NULL, NULL, NULL, NULL, NULL} }; # define ZEND_MM_STORAGE_DTOR() heap->storage->handlers->dtor(heap->storage) Index: main/spprintf.c =================================================================== --- main/spprintf.c (revision 5) +++ main/spprintf.c (working copy) @@ -764,7 +764,7 @@ */ PHPAPI int vspprintf(char **pbuf, size_t max_len, const char *format, va_list ap) /* {{{ */ { - smart_str xbuf = {0}; + smart_str xbuf = {NULL, 0, 0}; xbuf_format_converter(&xbuf, format, ap); Index: main/SAPI.c =================================================================== --- main/SAPI.c (revision 5) +++ main/SAPI.c (working copy) @@ -500,7 +500,7 @@ SAPI_API int sapi_add_header_ex(char *header_line, uint header_line_len, zend_bool duplicate, zend_bool replace TSRMLS_DC) { - sapi_header_line ctr = {0}; + sapi_header_line ctr = {NULL, 0, 0}; int r; ctr.line = header_line; Index: main/main.c =================================================================== --- main/main.c (revision 5) +++ main/main.c (working copy) @@ -980,7 +980,7 @@ !SG(headers_sent) && SG(sapi_headers).http_response_code == 200 ) { - sapi_header_line ctr = {0}; + sapi_header_line ctr = {NULL, 0, 0}; ctr.line = "HTTP/1.0 500 Internal Server Error"; ctr.line_len = strlen(ctr.line); @@ -1924,7 +1924,8 @@ PHPAPI int php_execute_script(zend_file_handle *primary_file TSRMLS_DC) { zend_file_handle *prepend_file_p, *append_file_p; - zend_file_handle prepend_file = {0}, append_file = {0}; + zend_file_handle prepend_file = {0, NULL, NULL, {0}, 0}; + zend_file_handle append_file = {0, NULL, NULL, {0}, 0}; #if HAVE_BROKEN_GETCWD int old_cwd_fd = -1; #else Index: main/streams/plain_wrapper.c =================================================================== --- main/streams/plain_wrapper.c (revision 5) +++ main/streams/plain_wrapper.c (working copy) @@ -1247,7 +1247,9 @@ php_stream_wrapper php_plain_files_wrapper = { &php_plain_files_wrapper_ops, NULL, - 0 + 0, + 0, + NULL }; /* {{{ php_stream_fopen_with_path */ Index: main/streams/memory.c =================================================================== --- main/streams/memory.c (revision 5) +++ main/streams/memory.c (working copy) @@ -746,6 +746,8 @@ &php_stream_rfc2397_wops, NULL, 1, /* is_url */ + 0, + NULL }; /* Index: main/streams/glob_wrapper.c =================================================================== --- main/streams/glob_wrapper.c (revision 5) +++ main/streams/glob_wrapper.c (working copy) @@ -281,7 +281,9 @@ php_stream_wrapper php_glob_stream_wrapper = { &php_glob_stream_wrapper_ops, NULL, - 0 + 0, + 0, + NULL }; /*
-- PHP Internals - PHP Runtime Development Mailing List To unsubscribe, visit: http://www.php.net/unsub.php