Skip to content

Commit

Permalink
Fix warnings surfacing in maintainer-mode.
Browse files Browse the repository at this point in the history
  • Loading branch information
stigsb committed Dec 1, 1999
1 parent 2ddc4fe commit 9353650
Show file tree
Hide file tree
Showing 13 changed files with 31 additions and 25 deletions.
4 changes: 4 additions & 0 deletions Zend/zend-scanner.h
Expand Up @@ -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
6 changes: 3 additions & 3 deletions Zend/zend.c
Expand Up @@ -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
Expand Down Expand Up @@ -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;
Expand Down
14 changes: 7 additions & 7 deletions Zend/zend.h
Expand Up @@ -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;

Expand Down Expand Up @@ -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);
Expand All @@ -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()
Expand Down
1 change: 1 addition & 0 deletions Zend/zend_alloc.h
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_builtin_functions.h
Expand Up @@ -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 */
4 changes: 2 additions & 2 deletions Zend/zend_compile.h
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
1 change: 1 addition & 0 deletions Zend/zend_constants.h
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_execute.c
Expand Up @@ -1779,7 +1779,7 @@ binary_assign_op_addr: {
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) {
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_execute.h
Expand Up @@ -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);

Expand Down
8 changes: 4 additions & 4 deletions Zend/zend_extensions.h
Expand Up @@ -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);

Expand All @@ -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
Expand All @@ -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 */
8 changes: 4 additions & 4 deletions Zend/zend_globals_macros.h
Expand Up @@ -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


Expand All @@ -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
Expand All @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_hash.h
Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_indent.h
Expand Up @@ -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 */

0 comments on commit 9353650

Please sign in to comment.