Skip to content

Fix warning of strict-prototypes #5673

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

Closed
wants to merge 1 commit into from
Closed
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
4 changes: 2 additions & 2 deletions TSRM/TSRM.c
Original file line number Diff line number Diff line change
Expand Up @@ -228,11 +228,11 @@ TSRM_API void tsrm_shutdown(void)

/* {{{ */
/* environ lock api */
TSRM_API void tsrm_env_lock() {
TSRM_API void tsrm_env_lock(void) {
tsrm_mutex_lock(tsrm_env_mutex);
}

TSRM_API void tsrm_env_unlock() {
TSRM_API void tsrm_env_unlock(void) {
tsrm_mutex_unlock(tsrm_env_mutex);
} /* }}} */

Expand Down
4 changes: 2 additions & 2 deletions TSRM/TSRM.h
Original file line number Diff line number Diff line change
Expand Up @@ -83,8 +83,8 @@ TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debu
TSRM_API void tsrm_shutdown(void);

/* environ lock API */
TSRM_API void tsrm_env_lock();
TSRM_API void tsrm_env_unlock();
TSRM_API void tsrm_env_lock(void);
TSRM_API void tsrm_env_unlock(void);

/* allocates a new thread-safe-resource id */
TSRM_API ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor);
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_gc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1611,7 +1611,7 @@ ZEND_API void zend_gc_get_status(zend_gc_status *status)
status->num_roots = GC_G(num_roots);
}

ZEND_API zend_get_gc_buffer *zend_get_gc_buffer_create() {
ZEND_API zend_get_gc_buffer *zend_get_gc_buffer_create(void) {
/* There can only be one get_gc() call active at a time,
* so there only needs to be one buffer. */
zend_get_gc_buffer *gc_buffer = &EG(get_gc_buffer);
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_gc.h
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ typedef struct {
zval *start;
} zend_get_gc_buffer;

ZEND_API zend_get_gc_buffer *zend_get_gc_buffer_create();
ZEND_API zend_get_gc_buffer *zend_get_gc_buffer_create(void);
ZEND_API void zend_get_gc_buffer_grow(zend_get_gc_buffer *gc_buffer);

static zend_always_inline void zend_get_gc_buffer_add_zval(
Expand Down
2 changes: 1 addition & 1 deletion ext/date/php_date.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ static inline long long php_date_llabs( long long i ) { return i >= 0 ? i : -i;
#endif
#endif

PHPAPI time_t php_time()
PHPAPI time_t php_time(void)
{
#ifdef HAVE_GETTIMEOFDAY
struct timeval tm;
Expand Down
2 changes: 1 addition & 1 deletion ext/date/php_date.h
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ ZEND_END_MODULE_GLOBALS(date)

#define DATEG(v) ZEND_MODULE_GLOBALS_ACCESSOR(date, v)

PHPAPI time_t php_time();
PHPAPI time_t php_time(void);

/* Backwards compatibility wrapper */
PHPAPI zend_long php_parse_date(char *string, zend_long *now);
Expand Down
2 changes: 1 addition & 1 deletion ext/gmp/gmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ ZEND_GET_MODULE(gmp)
static zend_class_entry *gmp_ce;
static zend_object_handlers gmp_object_handlers;

PHP_GMP_API zend_class_entry *php_gmp_class_entry() {
PHP_GMP_API zend_class_entry *php_gmp_class_entry(void) {
return gmp_ce;
}

Expand Down
2 changes: 1 addition & 1 deletion ext/gmp/php_gmp_int.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static inline gmp_object *php_gmp_object_from_zend_object(zend_object *zobj) {
return (gmp_object *)( ((char *)zobj) - XtOffsetOf(gmp_object, std) );
}

PHP_GMP_API zend_class_entry *php_gmp_class_entry();
PHP_GMP_API zend_class_entry *php_gmp_class_entry(void);

/* GMP and MPIR use different datatypes on different platforms */
#ifdef PHP_WIN32
Expand Down
8 changes: 4 additions & 4 deletions ext/mysqlnd/mysqlnd.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,9 @@
PHPAPI void mysqlnd_library_init(void);
PHPAPI void mysqlnd_library_end(void);

PHPAPI unsigned int mysqlnd_plugin_register();
PHPAPI unsigned int mysqlnd_plugin_register(void);
PHPAPI unsigned int mysqlnd_plugin_register_ex(struct st_mysqlnd_plugin_header * plugin);
PHPAPI unsigned int mysqlnd_plugin_count();
PHPAPI unsigned int mysqlnd_plugin_count(void);
PHPAPI void * mysqlnd_plugin_find(const char * const name);

PHPAPI void mysqlnd_plugin_apply_with_argument(apply_func_arg_t apply_func, void * argument);
Expand Down Expand Up @@ -155,8 +155,8 @@ PHPAPI enum_func_status mysqlnd_poll(MYSQLND **r_array, MYSQLND **e_array, MYSQL
#define mysqlnd_fetch_fields(result) (result)->m.fetch_fields((result))

/* mysqlnd metadata */
PHPAPI const char * mysqlnd_get_client_info();
PHPAPI unsigned long mysqlnd_get_client_version();
PHPAPI const char * mysqlnd_get_client_info(void);
PHPAPI unsigned long mysqlnd_get_client_version(void);

#define mysqlnd_ssl_set(conn, key, cert, ca, capath, cipher) ((conn)->data)->m->ssl_set((conn)->data, (key), (cert), (ca), (capath), (cipher))

Expand Down
4 changes: 2 additions & 2 deletions ext/mysqlnd/mysqlnd_connection.c
Original file line number Diff line number Diff line change
Expand Up @@ -1366,15 +1366,15 @@ MYSQLND_METHOD(mysqlnd_conn_data, info)(const MYSQLND_CONN_DATA * const conn)


/* {{{ mysqlnd_get_client_info */
PHPAPI const char * mysqlnd_get_client_info()
PHPAPI const char * mysqlnd_get_client_info(void)
{
return PHP_MYSQLND_VERSION;
}
/* }}} */


/* {{{ mysqlnd_get_client_version */
PHPAPI unsigned long mysqlnd_get_client_version()
PHPAPI unsigned long mysqlnd_get_client_version(void)
{
return MYSQLND_VERSION_ID;
}
Expand Down
4 changes: 2 additions & 2 deletions ext/mysqlnd/mysqlnd_plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ mysqlnd_plugin_subsystem_end(void)


/* {{{ mysqlnd_plugin_register */
PHPAPI unsigned int mysqlnd_plugin_register()
PHPAPI unsigned int mysqlnd_plugin_register(void)
{
return mysqlnd_plugin_register_ex(NULL);
}
Expand Down Expand Up @@ -181,7 +181,7 @@ PHPAPI void mysqlnd_plugin_apply_with_argument(apply_func_arg_t apply_func, void


/* {{{ mysqlnd_plugin_count */
PHPAPI unsigned int mysqlnd_plugin_count()
PHPAPI unsigned int mysqlnd_plugin_count(void)
{
return mysqlnd_plugins_counter;
}
Expand Down
2 changes: 1 addition & 1 deletion ext/mysqlnd/mysqlnd_result_meta.c
Original file line number Diff line number Diff line change
Expand Up @@ -309,7 +309,7 @@ mysqlnd_result_meta_init(MYSQLND_RES *result, unsigned int field_count)

/* {{{ mysqlnd_res_meta_get_methods */
PHPAPI struct st_mysqlnd_res_meta_methods *
mysqlnd_result_metadata_get_methods()
mysqlnd_result_metadata_get_methods(void)
{
return &mysqlnd_mysqlnd_res_meta_methods;
}
Expand Down
2 changes: 1 addition & 1 deletion ext/mysqlnd/mysqlnd_result_meta.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
#define MYSQLND_RESULT_META_H

PHPAPI MYSQLND_RES_METADATA * mysqlnd_result_meta_init(MYSQLND_RES * result, unsigned int field_count);
PHPAPI struct st_mysqlnd_res_meta_methods * mysqlnd_result_metadata_get_methods();
PHPAPI struct st_mysqlnd_res_meta_methods * mysqlnd_result_metadata_get_methods(void);
PHPAPI void ** _mysqlnd_plugin_get_plugin_result_metadata_data(const MYSQLND_RES_METADATA * meta, unsigned int plugin_id);

#endif /* MYSQLND_RESULT_META_H */
2 changes: 1 addition & 1 deletion ext/simplexml/php_simplexml.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,6 @@ typedef struct {
# define PHP_SXE_API ZEND_API
#endif

PHP_SXE_API zend_class_entry *sxe_get_element_class_entry();
PHP_SXE_API zend_class_entry *sxe_get_element_class_entry(void);

#endif
2 changes: 1 addition & 1 deletion ext/simplexml/simplexml.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@

zend_class_entry *sxe_class_entry = NULL;

PHP_SXE_API zend_class_entry *sxe_get_element_class_entry() /* {{{ */
PHP_SXE_API zend_class_entry *sxe_get_element_class_entry(void) /* {{{ */
{
return sxe_class_entry;
}
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/password.c
Original file line number Diff line number Diff line change
Expand Up @@ -468,7 +468,7 @@ PHP_MSHUTDOWN_FUNCTION(password) /* {{{ */
}
/* }}} */

const php_password_algo* php_password_algo_default() {
const php_password_algo* php_password_algo_default(void) {
return &php_password_algo_bcrypt;
}

Expand Down
2 changes: 1 addition & 1 deletion ext/standard/php_password.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ extern const php_password_algo php_password_algo_argon2id;

PHPAPI int php_password_algo_register(const char*, const php_password_algo*);
PHPAPI void php_password_algo_unregister(const char*);
PHPAPI const php_password_algo* php_password_algo_default();
PHPAPI const php_password_algo* php_password_algo_default(void);
PHPAPI zend_string *php_password_algo_extract_ident(const zend_string*);
PHPAPI const php_password_algo* php_password_algo_find(const zend_string*);

Expand Down
2 changes: 1 addition & 1 deletion sapi/cli/cli.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ typedef struct {
int (*cli_shell_run)(void);
} cli_shell_callbacks_t;

extern PHP_CLI_API cli_shell_callbacks_t *php_cli_get_shell_callbacks();
extern PHP_CLI_API cli_shell_callbacks_t *php_cli_get_shell_callbacks(void);

#endif /* CLI_H */
2 changes: 1 addition & 1 deletion sapi/cli/php_cli.c
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ static DWORD orig_cp = 0;
#define PHP_MODE_SHOW_INI_CONFIG 13

cli_shell_callbacks_t cli_shell_callbacks = { NULL, NULL, NULL };
PHP_CLI_API cli_shell_callbacks_t *php_cli_get_shell_callbacks()
PHP_CLI_API cli_shell_callbacks_t *php_cli_get_shell_callbacks(void)
{
return &cli_shell_callbacks;
}
Expand Down