From: Stig S. Bakken Date: Wed, 1 Dec 1999 22:55:20 +0000 (+0000) Subject: Fix warnings surfacing in maintainer-mode. X-Git-Tag: PRE_RETURN_REF_PATCH~136 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=93536507f686a9dfb041b4583cd37cf4c6c4c37c;p=php Fix warnings surfacing in maintainer-mode. --- diff --git a/Zend/zend-scanner.h b/Zend/zend-scanner.h index 8b51d5d6ba..4675a15a3a 100644 --- a/Zend/zend-scanner.h +++ b/Zend/zend-scanner.h @@ -49,4 +49,8 @@ typedef struct _zend_lex_state { } zend_lex_state; #endif +void zend_fatal_scanner_error(char *); +inline void restore_lexical_state(zend_lex_state * CLS_DC); +int zend_compare_file_handles(zend_file_handle *fh1, zend_file_handle *fh2); + #endif diff --git a/Zend/zend.c b/Zend/zend.c index dc1b024d19..34889f76f9 100644 --- a/Zend/zend.c +++ b/Zend/zend.c @@ -45,8 +45,8 @@ ZEND_API int (*zend_write)(const char *str, uint str_length); ZEND_API void (*zend_error)(int type, const char *format, ...); ZEND_API void (*zend_message_dispatcher)(long message, void *data); ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path); -ZEND_API void (*zend_block_interruptions)(); -ZEND_API void (*zend_unblock_interruptions)(); +ZEND_API void (*zend_block_interruptions)(void); +ZEND_API void (*zend_unblock_interruptions)(void); ZEND_API int (*zend_get_ini_entry)(char *name, uint name_length, zval *contents); #ifdef ZTS @@ -217,7 +217,7 @@ static FILE *zend_fopen_wrapper(const char *filename, char **opened_path) } -static void register_standard_class() +static void register_standard_class(void) { zend_standard_class_def.type = ZEND_INTERNAL_CLASS; zend_standard_class_def.name_length = sizeof("stdClass") - 1; diff --git a/Zend/zend.h b/Zend/zend.h index 494c03913a..c056a8a12e 100644 --- a/Zend/zend.h +++ b/Zend/zend.h @@ -180,8 +180,8 @@ typedef struct _zend_utility_functions { int (*write_function)(const char *str, uint str_length); FILE *(*fopen_function)(const char *filename, char **opened_path); void (*message_handler)(long message, void *data); - void (*block_interruptions)(); - void (*unblock_interruptions)(); + void (*block_interruptions)(void); + void (*unblock_interruptions)(void); int (*get_ini_entry)(char *name, uint name_length, zval *contents); } zend_utility_functions; @@ -210,13 +210,13 @@ typedef struct _zend_utility_values { #define IS_METHOD 10 /* for overloaded function calls */ int zend_startup(zend_utility_functions *utility_functions, char **extensions); -void zend_shutdown(); +void zend_shutdown(void); void zend_set_utility_values(zend_utility_values *utility_values); BEGIN_EXTERN_C() -ZEND_API void zend_bailout(); +ZEND_API void zend_bailout(void); END_EXTERN_C() -ZEND_API char *get_zend_version(); +ZEND_API char *get_zend_version(void); ZEND_API void zend_make_printable_zval(zval *expr, zval *expr_copy, int *use_copy); ZEND_API int zend_print_zval(zval *expr, int indent); @@ -238,8 +238,8 @@ extern ZEND_API int (*zend_printf)(const char *format, ...); extern ZEND_API int (*zend_write)(const char *str, uint str_length); extern ZEND_API void (*zend_error)(int type, const char *format, ...); extern ZEND_API FILE *(*zend_fopen)(const char *filename, char **opened_path); -extern ZEND_API void (*zend_block_interruptions)(); -extern ZEND_API void (*zend_unblock_interruptions)(); +extern ZEND_API void (*zend_block_interruptions)(void); +extern ZEND_API void (*zend_unblock_interruptions)(void); extern ZEND_API void (*zend_message_dispatcher)(long message, void *data); extern ZEND_API int (*zend_get_ini_entry)(char *name, uint name_length, zval *contents); END_EXTERN_C() diff --git a/Zend/zend_alloc.h b/Zend/zend_alloc.h index 5eda4fd102..ae31881675 100644 --- a/Zend/zend_alloc.h +++ b/Zend/zend_alloc.h @@ -109,6 +109,7 @@ ZEND_API void shutdown_memory_manager(int silent, int clean_cache); #if ZEND_DEBUG ZEND_API int _mem_block_check(void *ptr, int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC); ZEND_API void _full_mem_check(int silent ZEND_FILE_LINE_DC ZEND_FILE_LINE_ORIG_DC); +void zend_debug_alloc_output(char *format, ...); #define mem_block_check(ptr, silent) _mem_block_check(ptr, silent ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) #define full_mem_check(silent) _full_mem_check(silent ZEND_FILE_LINE_CC ZEND_FILE_LINE_EMPTY_CC) #else diff --git a/Zend/zend_builtin_functions.h b/Zend/zend_builtin_functions.h index ddc2464d15..fa3f529463 100644 --- a/Zend/zend_builtin_functions.h +++ b/Zend/zend_builtin_functions.h @@ -21,6 +21,6 @@ #ifndef _ZEND_BUILTIN_FUNCTIONS_H #define _ZEND_BUILTIN_FUNCTIONS_H -int zend_startup_builtin_functions(); +int zend_startup_builtin_functions(void); #endif /* _ZEND_BUILTIN_FUNCTIONS_H */ diff --git a/Zend/zend_compile.h b/Zend/zend_compile.h index eb56ca2519..04072d11a2 100644 --- a/Zend/zend_compile.h +++ b/Zend/zend_compile.h @@ -205,7 +205,7 @@ void shutdown_scanner(CLS_D); ZEND_API char *zend_set_compiled_filename(char *new_compiled_filename); ZEND_API void zend_restore_compiled_filename(char *original_compiled_filename); -ZEND_API char *zend_get_compiled_filename(); +ZEND_API char *zend_get_compiled_filename(void); #ifdef ZTS const char *zend_get_zendtext(CLS_D); @@ -309,7 +309,7 @@ void do_shell_exec(znode *result, znode *cmd CLS_DC); void do_init_array(znode *result, znode *expr, znode *offset, int is_ref CLS_DC); void do_add_array_element(znode *result, znode *expr, znode *offset, int is_ref CLS_DC); void do_add_static_array_element(znode *result, znode *offset, znode *expr); -void do_list_init(); +void do_list_init(void); void do_list_end(znode *result, znode *expr CLS_DC); void do_add_list_element(znode *element CLS_DC); void do_new_list_begin(CLS_D); diff --git a/Zend/zend_constants.h b/Zend/zend_constants.h index fd196c450d..9722979f94 100644 --- a/Zend/zend_constants.h +++ b/Zend/zend_constants.h @@ -57,6 +57,7 @@ ZEND_API void zend_register_string_constant(char *name, uint name_len, char *str ZEND_API void zend_register_stringl_constant(char *name, uint name_len, char *strval, uint strlen, int flags, int module_number ELS_DC); ZEND_API void zend_register_constant(zend_constant *c ELS_DC); void zend_copy_constants(HashTable *target, HashTable *sourc); +void copy_zend_constant(zend_constant *c); #define ZEND_CONSTANT_DTOR (int (*)(void *)) free_zend_constant diff --git a/Zend/zend_execute.c b/Zend/zend_execute.c index 786299f69f..b1ebfb0b86 100644 --- a/Zend/zend_execute.c +++ b/Zend/zend_execute.c @@ -1779,7 +1779,7 @@ send_by_ref: case ZEND_INIT_ARRAY: case ZEND_ADD_ARRAY_ELEMENT: { zval *array_ptr = &Ts[opline->result.u.var].tmp_var; - zval *expr_ptr, **expr_ptr_ptr; + zval *expr_ptr, **expr_ptr_ptr = NULL; zval *offset=get_zval_ptr(&opline->op2, Ts, &EG(free_op2), BP_VAR_R); if (opline->extended_value) { diff --git a/Zend/zend_execute.h b/Zend/zend_execute.h index 84296c089d..4075588703 100644 --- a/Zend/zend_execute.h +++ b/Zend/zend_execute.h @@ -62,7 +62,7 @@ void execute_new_code(CLS_D); /* services */ -ZEND_API char *get_active_function_name(); +ZEND_API char *get_active_function_name(void); ZEND_API char *zend_get_executed_filename(ELS_D); ZEND_API uint zend_get_executed_lineno(ELS_D); diff --git a/Zend/zend_extensions.h b/Zend/zend_extensions.h index a6b9ff7c5b..4b3299ac84 100644 --- a/Zend/zend_extensions.h +++ b/Zend/zend_extensions.h @@ -44,8 +44,8 @@ struct _zend_extension { int (*startup)(zend_extension *extension); void (*shutdown)(zend_extension *extension); - void (*activate)(); - void (*deactivate)(); + void (*activate)(void); + void (*deactivate)(void); void (*op_array_handler)(zend_op_array *op_array); @@ -70,7 +70,7 @@ struct _zend_extension { }; -ZEND_API int zend_get_resource_handle(); +ZEND_API int zend_get_resource_handle(zend_extension *extension); #ifdef ZTS #define ZTS_V 1 @@ -91,6 +91,6 @@ void zend_extension_dtor(zend_extension *extension); int zend_load_extension(char *path); int zend_load_extensions(char **extension_paths); void zend_append_version_info(zend_extension *extension); -void zend_shutdown_extensions(); +void zend_shutdown_extensions(void); #endif /* _ZEND_EXTENSIONS_H */ diff --git a/Zend/zend_globals_macros.h b/Zend/zend_globals_macros.h index f6dea7f589..c3ce64e639 100644 --- a/Zend/zend_globals_macros.h +++ b/Zend/zend_globals_macros.h @@ -39,14 +39,14 @@ BEGIN_EXTERN_C() int zendparse(void *compiler_globals); END_EXTERN_C() #else -# define CLS_D +# define CLS_D void # define CLS_DC # define CLS_C # define CLS_CC # define CG(v) (compiler_globals.v) # define CLS_FETCH() extern ZEND_API struct _zend_compiler_globals compiler_globals; -int zendparse(); +int zendparse(void); #endif @@ -59,7 +59,7 @@ int zendparse(); # define EG(v) (executor_globals->v) # define ELS_FETCH() zend_executor_globals *executor_globals = (zend_executor_globals *) ts_resource(executor_globals_id) #else -# define ELS_D +# define ELS_D void # define ELS_DC # define ELS_C # define ELS_CC @@ -78,7 +78,7 @@ extern ZEND_API zend_executor_globals executor_globals; # define AG(v) (((zend_alloc_globals *) alloc_globals)->v) # define ALS_FETCH() zend_alloc_globals *alloc_globals = (zend_alloc_globals *) ts_resource(alloc_globals_id) #else -# define ALS_D +# define ALS_D void # define ALS_DC # define ALS_C # define ALS_CC diff --git a/Zend/zend_hash.h b/Zend/zend_hash.h index 782a59271c..4c6d740883 100644 --- a/Zend/zend_hash.h +++ b/Zend/zend_hash.h @@ -165,7 +165,7 @@ ZEND_API int zend_hash_rehash(HashTable *ht); ZEND_API ulong hashpjw(char *arKey, uint nKeyLength); -#if DEBUG +#if ZEND_DEBUG /* debug */ void zend_hash_display_pListTail(HashTable *ht); void zend_hash_display(HashTable *ht); diff --git a/Zend/zend_indent.h b/Zend/zend_indent.h index aefc26464b..f534795218 100644 --- a/Zend/zend_indent.h +++ b/Zend/zend_indent.h @@ -21,6 +21,6 @@ #ifndef _ZEND_INDENT_H #define _ZEND_INDENT_H -ZEND_API void zend_indent(); +ZEND_API void zend_indent(void); #endif /* _ZEND_INDENT_H */