summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortwosee <twose@qq.com>2020-06-06 20:13:38 +0800
committerNikita Popov <nikita.ppv@gmail.com>2020-06-07 10:36:50 +0200
commit1b85e749c7e892db727806a92f4e215a8538ba9e (patch)
treec6f8b947d544635d6ace6517f4e02cecf31489fa
parent68fdad82c9a3d1d1fc03975b7b91fdb940c621e0 (diff)
downloadphp-git-1b85e749c7e892db727806a92f4e215a8538ba9e.tar.gz
Fix warning of strict-prototypes
Closes GH-5673.
-rw-r--r--TSRM/TSRM.c4
-rw-r--r--TSRM/TSRM.h4
-rw-r--r--Zend/zend_gc.c2
-rw-r--r--Zend/zend_gc.h2
-rw-r--r--ext/date/php_date.c2
-rw-r--r--ext/date/php_date.h2
-rw-r--r--ext/gmp/gmp.c2
-rw-r--r--ext/gmp/php_gmp_int.h2
-rw-r--r--ext/mysqlnd/mysqlnd.h8
-rw-r--r--ext/mysqlnd/mysqlnd_connection.c4
-rw-r--r--ext/mysqlnd/mysqlnd_plugin.c4
-rw-r--r--ext/mysqlnd/mysqlnd_result_meta.c2
-rw-r--r--ext/mysqlnd/mysqlnd_result_meta.h2
-rw-r--r--ext/simplexml/php_simplexml.h2
-rw-r--r--ext/simplexml/simplexml.c2
-rw-r--r--ext/standard/password.c2
-rw-r--r--ext/standard/php_password.h2
-rw-r--r--sapi/cli/cli.h2
-rw-r--r--sapi/cli/php_cli.c2
19 files changed, 26 insertions, 26 deletions
diff --git a/TSRM/TSRM.c b/TSRM/TSRM.c
index cd41b078a7..1074c6b251 100644
--- a/TSRM/TSRM.c
+++ b/TSRM/TSRM.c
@@ -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);
} /* }}} */
diff --git a/TSRM/TSRM.h b/TSRM/TSRM.h
index 75553edabc..661c873292 100644
--- a/TSRM/TSRM.h
+++ b/TSRM/TSRM.h
@@ -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);
diff --git a/Zend/zend_gc.c b/Zend/zend_gc.c
index 76f60b7abf..1daf1d9214 100644
--- a/Zend/zend_gc.c
+++ b/Zend/zend_gc.c
@@ -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);
diff --git a/Zend/zend_gc.h b/Zend/zend_gc.h
index f9cbde39d2..8fc0073181 100644
--- a/Zend/zend_gc.h
+++ b/Zend/zend_gc.h
@@ -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(
diff --git a/ext/date/php_date.c b/ext/date/php_date.c
index e71699ecbf..32c22cfd1b 100644
--- a/ext/date/php_date.c
+++ b/ext/date/php_date.c
@@ -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;
diff --git a/ext/date/php_date.h b/ext/date/php_date.h
index 871114c44b..1ab7b3ccd9 100644
--- a/ext/date/php_date.h
+++ b/ext/date/php_date.h
@@ -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);
diff --git a/ext/gmp/gmp.c b/ext/gmp/gmp.c
index b6b3811a68..5dabeaddff 100644
--- a/ext/gmp/gmp.c
+++ b/ext/gmp/gmp.c
@@ -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;
}
diff --git a/ext/gmp/php_gmp_int.h b/ext/gmp/php_gmp_int.h
index d8111a6e47..d4ef5f0157 100644
--- a/ext/gmp/php_gmp_int.h
+++ b/ext/gmp/php_gmp_int.h
@@ -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
diff --git a/ext/mysqlnd/mysqlnd.h b/ext/mysqlnd/mysqlnd.h
index b21c227c51..dc9b1e9732 100644
--- a/ext/mysqlnd/mysqlnd.h
+++ b/ext/mysqlnd/mysqlnd.h
@@ -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))
diff --git a/ext/mysqlnd/mysqlnd_connection.c b/ext/mysqlnd/mysqlnd_connection.c
index c1b2926711..27ef38c61e 100644
--- a/ext/mysqlnd/mysqlnd_connection.c
+++ b/ext/mysqlnd/mysqlnd_connection.c
@@ -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;
}
diff --git a/ext/mysqlnd/mysqlnd_plugin.c b/ext/mysqlnd/mysqlnd_plugin.c
index 3d8273ad18..17ffd13d03 100644
--- a/ext/mysqlnd/mysqlnd_plugin.c
+++ b/ext/mysqlnd/mysqlnd_plugin.c
@@ -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;
}
diff --git a/ext/mysqlnd/mysqlnd_result_meta.c b/ext/mysqlnd/mysqlnd_result_meta.c
index b9e4129add..1cbc438b44 100644
--- a/ext/mysqlnd/mysqlnd_result_meta.c
+++ b/ext/mysqlnd/mysqlnd_result_meta.c
@@ -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;
}
diff --git a/ext/mysqlnd/mysqlnd_result_meta.h b/ext/mysqlnd/mysqlnd_result_meta.h
index b0a1fe23b1..9ca49084e7 100644
--- a/ext/mysqlnd/mysqlnd_result_meta.h
+++ b/ext/mysqlnd/mysqlnd_result_meta.h
@@ -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 */
diff --git a/ext/simplexml/php_simplexml.h b/ext/simplexml/php_simplexml.h
index 164525d7b6..4620afad06 100644
--- a/ext/simplexml/php_simplexml.h
+++ b/ext/simplexml/php_simplexml.h
@@ -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
diff --git a/ext/simplexml/simplexml.c b/ext/simplexml/simplexml.c
index 0c5591b5b5..85372cb53d 100644
--- a/ext/simplexml/simplexml.c
+++ b/ext/simplexml/simplexml.c
@@ -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;
}
diff --git a/ext/standard/password.c b/ext/standard/password.c
index 0efa624bf3..1616cf8774 100644
--- a/ext/standard/password.c
+++ b/ext/standard/password.c
@@ -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;
}
diff --git a/ext/standard/php_password.h b/ext/standard/php_password.h
index 5f9ae671ba..45a21c5c34 100644
--- a/ext/standard/php_password.h
+++ b/ext/standard/php_password.h
@@ -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*);
diff --git a/sapi/cli/cli.h b/sapi/cli/cli.h
index 694de0d9e9..a713b5eccf 100644
--- a/sapi/cli/cli.h
+++ b/sapi/cli/cli.h
@@ -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 */
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index d068952343..f116bc475f 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -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;
}