Skip to content

Fix -Wundef/C4668 warnings #15853

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Sep 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Zend/zend_API.c
Original file line number Diff line number Diff line change
Expand Up @@ -2958,7 +2958,7 @@ ZEND_API zend_result zend_register_functions(zend_class_entry *scope, const zend
if (EG(active)) { // at run-time: this ought to only happen if registered with dl() or somehow temporarily at runtime
ZEND_MAP_PTR_INIT(internal_function->run_time_cache, zend_arena_calloc(&CG(arena), 1, zend_internal_run_time_cache_reserved_size()));
} else {
#if ZTS
#ifdef ZTS
ZEND_MAP_PTR_NEW_STATIC(internal_function->run_time_cache);
#else
ZEND_MAP_PTR_INIT(internal_function->run_time_cache, NULL);
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_enum.c
Original file line number Diff line number Diff line change
Expand Up @@ -421,7 +421,7 @@ static void zend_enum_register_func(zend_class_entry *ce, zend_known_string_id n
if (EG(active)) { // at run-time
ZEND_MAP_PTR_INIT(zif->run_time_cache, zend_arena_calloc(&CG(arena), 1, zend_internal_run_time_cache_reserved_size()));
} else {
#if ZTS
#ifdef ZTS
ZEND_MAP_PTR_NEW_STATIC(zif->run_time_cache);
#else
ZEND_MAP_PTR_INIT(zif->run_time_cache, NULL);
Expand Down
2 changes: 1 addition & 1 deletion ext/ffi/ffi.c
Original file line number Diff line number Diff line change
Expand Up @@ -5393,7 +5393,7 @@ static zend_result ffi_fixup_temporaries(void) {
++zend_ffi_cast_fn.T;
++zend_ffi_type_fn.T;
}
#if !ZTS
#ifndef ZTS
ZEND_MAP_PTR(zend_ffi_new_fn.run_time_cache) = ZEND_MAP_PTR(((zend_internal_function *)zend_hash_str_find_ptr(&zend_ffi_ce->function_table, "new", sizeof("new")-1))->run_time_cache);
ZEND_MAP_PTR(zend_ffi_cast_fn.run_time_cache) = ZEND_MAP_PTR(((zend_internal_function *)zend_hash_str_find_ptr(&zend_ffi_ce->function_table, "cast", sizeof("cast")-1))->run_time_cache);
ZEND_MAP_PTR(zend_ffi_type_fn.run_time_cache) = ZEND_MAP_PTR(((zend_internal_function *)zend_hash_str_find_ptr(&zend_ffi_ce->function_table, "type", sizeof("type")-1))->run_time_cache);
Expand Down
2 changes: 1 addition & 1 deletion ext/opcache/jit/zend_jit_ir.c
Original file line number Diff line number Diff line change
Expand Up @@ -4544,7 +4544,7 @@ static struct jit_observer_fcall_is_unobserved_data jit_observer_fcall_is_unobse
if (func && (func->common.fn_flags & ZEND_ACC_CLOSURE) == 0 && ZEND_MAP_PTR_IS_OFFSET(func->common.run_time_cache)) {
// JIT: ZEND_MAP_PTR_GET_IMM(func->common.runtime_cache)
run_time_cache = ir_LOAD_A(ir_ADD_OFFSET(ir_LOAD_A(jit_CG(map_ptr_base)), (uintptr_t)ZEND_MAP_PTR(func->common.run_time_cache)));
#if !ZTS
#ifndef ZTS
} else if (func && rx == IS_UNUSED) { // happens for internal functions only
ZEND_ASSERT(!ZEND_USER_CODE(func->type));
run_time_cache = ir_LOAD_A(ir_ADD_OFFSET(ir_CONST_ADDR(func), offsetof(zend_op_array, run_time_cache__ptr)));
Expand Down
2 changes: 1 addition & 1 deletion ext/readline/readline.c
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ PHP_FUNCTION(readline_info)
if (!try_convert_to_string(value)) {
RETURN_THROWS();
}
#if !defined(PHP_WIN32) && !HAVE_LIBEDIT
#if !defined(PHP_WIN32) && !defined(HAVE_LIBEDIT)
if (!rl_line_buffer) {
rl_line_buffer = malloc(Z_STRLEN_P(value) + 1);
} else if (strlen(oldstr) < Z_STRLEN_P(value)) {
Expand Down
2 changes: 1 addition & 1 deletion ext/xmlreader/php_xmlreader.c
Original file line number Diff line number Diff line change
Expand Up @@ -1276,7 +1276,7 @@ static zend_result xmlreader_fixup_temporaries(void) {
++xmlreader_open_fn.T;
++xmlreader_xml_fn.T;
}
#if !ZTS
#ifndef ZTS
ZEND_MAP_PTR(xmlreader_open_fn.run_time_cache) = ZEND_MAP_PTR(((zend_internal_function *)zend_hash_str_find_ptr(&xmlreader_class_entry->function_table, "open", sizeof("open")-1))->run_time_cache);
ZEND_MAP_PTR(xmlreader_xml_fn.run_time_cache) = ZEND_MAP_PTR(((zend_internal_function *)zend_hash_str_find_ptr(&xmlreader_class_entry->function_table, "xml", sizeof("xml")-1))->run_time_cache);
#endif
Expand Down
2 changes: 1 addition & 1 deletion main/network.c
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ PHPAPI int php_network_getaddresses(const char *host, int socktype, struct socka
} else {
php_error_docref(NULL, E_WARNING, "php_network_getaddresses: getaddrinfo for %s failed: %s", host, gai_error);
}
# if PHP_WIN32
# ifdef PHP_WIN32
php_win32_error_msg_free(gai_error);
# endif
return 0;
Expand Down
Loading