Fix warning of strict-prototypes

Closes GH-5673.
This commit is contained in:
twosee 2020-06-06 20:13:38 +08:00 committed by Nikita Popov
parent 68fdad82c9
commit 1b85e749c7
19 changed files with 26 additions and 26 deletions

View file

@ -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);
} /* }}} */

View file

@ -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);

View file

@ -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);

View file

@ -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(

View file

@ -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;

View file

@ -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);

View file

@ -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;
}

View file

@ -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

View file

@ -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);
@ -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))

View file

@ -1366,7 +1366,7 @@ 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;
}
@ -1374,7 +1374,7 @@ PHPAPI const char * mysqlnd_get_client_info()
/* {{{ mysqlnd_get_client_version */
PHPAPI unsigned long mysqlnd_get_client_version()
PHPAPI unsigned long mysqlnd_get_client_version(void)
{
return MYSQLND_VERSION_ID;
}

View file

@ -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);
}
@ -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;
}

View file

@ -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;
}

View file

@ -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 */

View file

@ -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

View file

@ -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;
}

View file

@ -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;
}

View file

@ -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*);

View file

@ -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 */

View file

@ -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;
}