Skip to content

Commit be9d4a5

Browse files
committed
Fix -Wenum-int-mismatch warnings on gcc 13
1 parent b22758d commit be9d4a5

File tree

11 files changed

+17
-17
lines changed

11 files changed

+17
-17
lines changed

Zend/Optimizer/zend_inference.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,7 @@ BEGIN_EXTERN_C()
220220

221221
ZEND_API void zend_ssa_find_false_dependencies(const zend_op_array *op_array, zend_ssa *ssa);
222222
ZEND_API void zend_ssa_find_sccs(const zend_op_array *op_array, zend_ssa *ssa);
223-
ZEND_API int zend_ssa_inference(zend_arena **raena, const zend_op_array *op_array, const zend_script *script, zend_ssa *ssa, zend_long optimization_level);
223+
ZEND_API zend_result zend_ssa_inference(zend_arena **raena, const zend_op_array *op_array, const zend_script *script, zend_ssa *ssa, zend_long optimization_level);
224224

225225
ZEND_API uint32_t zend_array_element_type(uint32_t t1, uint8_t op_type, int write, int insert);
226226

Zend/zend_API.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -416,7 +416,7 @@ ZEND_API bool zend_is_callable_ex(zval *callable, zend_object *object, uint32_t
416416
ZEND_API bool zend_is_callable(zval *callable, uint32_t check_flags, zend_string **callable_name);
417417
ZEND_API bool zend_make_callable(zval *callable, zend_string **callable_name);
418418
ZEND_API const char *zend_get_module_version(const char *module_name);
419-
ZEND_API int zend_get_module_started(const char *module_name);
419+
ZEND_API zend_result zend_get_module_started(const char *module_name);
420420

421421
ZEND_API zend_property_info *zend_declare_typed_property(zend_class_entry *ce, zend_string *name, zval *property, int access_type, zend_string *doc_comment, zend_type type);
422422

Zend/zend_compile.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -851,8 +851,8 @@ ZEND_API zend_op_array *compile_string(zend_string *source_string, const char *f
851851
ZEND_API zend_op_array *compile_filename(int type, zend_string *filename);
852852
ZEND_API zend_ast *zend_compile_string_to_ast(
853853
zend_string *code, struct _zend_arena **ast_arena, zend_string *filename);
854-
ZEND_API int zend_execute_scripts(int type, zval *retval, int file_count, ...);
855-
ZEND_API int open_file_for_scanning(zend_file_handle *file_handle);
854+
ZEND_API zend_result zend_execute_scripts(int type, zval *retval, int file_count, ...);
855+
ZEND_API zend_result open_file_for_scanning(zend_file_handle *file_handle);
856856
ZEND_API void init_op_array(zend_op_array *op_array, uint8_t type, int initial_ops_size);
857857
ZEND_API void destroy_op_array(zend_op_array *op_array);
858858
ZEND_API void zend_destroy_static_vars(zend_op_array *op_array);

Zend/zend_execute.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ ZEND_API bool zend_gcc_global_regs(void);
404404

405405
#define ZEND_USER_OPCODE_DISPATCH_TO 0x100 /* call original handler of returned opcode */
406406

407-
ZEND_API int zend_set_user_opcode_handler(uint8_t opcode, user_opcode_handler_t handler);
407+
ZEND_API zend_result zend_set_user_opcode_handler(uint8_t opcode, user_opcode_handler_t handler);
408408
ZEND_API user_opcode_handler_t zend_get_user_opcode_handler(uint8_t opcode);
409409

410410
ZEND_API zval *zend_get_zval_ptr(const zend_op *opline, int op_type, const znode_op *node, const zend_execute_data *execute_data);
@@ -419,7 +419,7 @@ ZEND_API HashTable *zend_unfinished_execution_gc_ex(zend_execute_data *execute_d
419419
zval * ZEND_FASTCALL zend_handle_named_arg(
420420
zend_execute_data **call_ptr, zend_string *arg_name,
421421
uint32_t *arg_num_ptr, void **cache_slot);
422-
ZEND_API int ZEND_FASTCALL zend_handle_undef_args(zend_execute_data *call);
422+
ZEND_API zend_result ZEND_FASTCALL zend_handle_undef_args(zend_execute_data *call);
423423

424424
#define CACHE_ADDR(num) \
425425
((void**)((char*)EX(run_time_cache) + (num)))

Zend/zend_ini.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -234,8 +234,8 @@ END_EXTERN_C()
234234
/* INI parsing engine */
235235
typedef void (*zend_ini_parser_cb_t)(zval *arg1, zval *arg2, zval *arg3, int callback_type, void *arg);
236236
BEGIN_EXTERN_C()
237-
ZEND_API int zend_parse_ini_file(zend_file_handle *fh, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg);
238-
ZEND_API int zend_parse_ini_string(const char *str, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg);
237+
ZEND_API zend_result zend_parse_ini_file(zend_file_handle *fh, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg);
238+
ZEND_API zend_result zend_parse_ini_string(const char *str, bool unbuffered_errors, int scanner_mode, zend_ini_parser_cb_t ini_parser_cb, void *arg);
239239
END_EXTERN_C()
240240

241241
/* INI entries */

Zend/zend_interfaces.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static void zend_user_it_dtor(zend_object_iterator *_iter)
118118
/* }}} */
119119

120120
/* {{{ zend_user_it_valid */
121-
ZEND_API int zend_user_it_valid(zend_object_iterator *_iter)
121+
ZEND_API zend_result zend_user_it_valid(zend_object_iterator *_iter)
122122
{
123123
if (_iter) {
124124
zend_user_iterator *iter = (zend_user_iterator*)_iter;

Zend/zend_list.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ void zend_destroy_rsrc_list_dtors(void);
5454

5555
ZEND_API zval* ZEND_FASTCALL zend_list_insert(void *ptr, int type);
5656
ZEND_API void ZEND_FASTCALL zend_list_free(zend_resource *res);
57-
ZEND_API int ZEND_FASTCALL zend_list_delete(zend_resource *res);
57+
ZEND_API zend_result ZEND_FASTCALL zend_list_delete(zend_resource *res);
5858
ZEND_API void ZEND_FASTCALL zend_list_close(zend_resource *res);
5959

6060
ZEND_API zend_resource *zend_register_resource(void *rsrc_pointer, int rsrc_type);

Zend/zend_multibyte.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,12 +66,12 @@ ZEND_API const char *zend_multibyte_get_encoding_name(const zend_encoding *encod
6666
ZEND_API int zend_multibyte_check_lexer_compatibility(const zend_encoding *encoding);
6767
ZEND_API const zend_encoding *zend_multibyte_encoding_detector(const unsigned char *string, size_t length, const zend_encoding **list, size_t list_size);
6868
ZEND_API size_t zend_multibyte_encoding_converter(unsigned char **to, size_t *to_length, const unsigned char *from, size_t from_length, const zend_encoding *encoding_to, const zend_encoding *encoding_from);
69-
ZEND_API int zend_multibyte_parse_encoding_list(const char *encoding_list, size_t encoding_list_len, const zend_encoding ***return_list, size_t *return_size, bool persistent);
69+
ZEND_API zend_result zend_multibyte_parse_encoding_list(const char *encoding_list, size_t encoding_list_len, const zend_encoding ***return_list, size_t *return_size, bool persistent);
7070

7171
ZEND_API const zend_encoding *zend_multibyte_get_internal_encoding(void);
7272
ZEND_API const zend_encoding *zend_multibyte_get_script_encoding(void);
7373
ZEND_API int zend_multibyte_set_script_encoding(const zend_encoding **encoding_list, size_t encoding_list_size);
74-
ZEND_API int zend_multibyte_set_internal_encoding(const zend_encoding *encoding);
74+
ZEND_API zend_result zend_multibyte_set_internal_encoding(const zend_encoding *encoding);
7575
ZEND_API zend_result zend_multibyte_set_script_encoding_by_string(const char *new_value, size_t new_value_length);
7676

7777
END_EXTERN_C()

Zend/zend_signal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ ZEND_API zend_signal_globals_t zend_signal_globals;
6262
#endif
6363

6464
static void zend_signal_handler(int signo, siginfo_t *siginfo, void *context);
65-
static int zend_signal_register(int signo, void (*handler)(int, siginfo_t*, void*));
65+
static zend_result zend_signal_register(int signo, void (*handler)(int, siginfo_t*, void*));
6666

6767
#if defined(__CYGWIN__) || defined(__PASE__)
6868
/* Matches zend_execute_API.c; these platforms don't support ITIMER_PROF. */

Zend/zend_virtual_cwd.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,7 @@ CWD_API int virtual_cwd_activate(void);
160160
CWD_API int virtual_cwd_deactivate(void);
161161
CWD_API char *virtual_getcwd_ex(size_t *length);
162162
CWD_API char *virtual_getcwd(char *buf, size_t size);
163-
CWD_API int virtual_chdir(const char *path);
163+
CWD_API zend_result virtual_chdir(const char *path);
164164
CWD_API int virtual_chdir_file(const char *path, int (*p_chdir)(const char *path));
165165
CWD_API int virtual_filepath(const char *path, char **filepath);
166166
CWD_API int virtual_filepath_ex(const char *path, char **filepath, verify_path_func verify_path);

ext/session/session.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@
5656

5757
PHPAPI ZEND_DECLARE_MODULE_GLOBALS(ps)
5858

59-
static int php_session_rfc1867_callback(unsigned int event, void *event_data, void **extra);
59+
static zend_result php_session_rfc1867_callback(unsigned int event, void *event_data, void **extra);
6060
static int (*php_session_rfc1867_orig_callback)(unsigned int event, void *event_data, void **extra);
6161
static void php_session_track_init(void);
6262

@@ -97,8 +97,8 @@ zend_class_entry *php_session_update_timestamp_iface_entry;
9797

9898
#define APPLY_TRANS_SID (PS(use_trans_sid) && !PS(use_only_cookies))
9999

100-
static int php_session_send_cookie(void);
101-
static int php_session_abort(void);
100+
static zend_result php_session_send_cookie(void);
101+
static zend_result php_session_abort(void);
102102

103103
/* Initialized in MINIT, readonly otherwise. */
104104
static int my_module_number = 0;

0 commit comments

Comments
 (0)