summaryrefslogtreecommitdiff
path: root/Zend
diff options
context:
space:
mode:
authortwosee <twose@qq.com>2020-07-23 00:59:00 +0800
committertwosee <twose@qq.com>2020-07-23 00:59:00 +0800
commit6e92487f66794befb9d312a92e5b383dec012daf (patch)
tree363fe7cc4c967ddb538d88108fd17a72ccc90aac /Zend
parenta65ec4c2db58632b0d9b76516d0fe6d2b5fb4ba5 (diff)
downloadphp-git-6e92487f66794befb9d312a92e5b383dec012daf.tar.gz
Fix warnings of strict-prototypes
Closes GH-5887.
Diffstat (limited to 'Zend')
-rw-r--r--Zend/zend.c4
-rw-r--r--Zend/zend.h4
-rw-r--r--Zend/zend_cpuinfo.h2
-rw-r--r--Zend/zend_exceptions.c2
-rw-r--r--Zend/zend_weakrefs.c4
-rw-r--r--Zend/zend_weakrefs.h4
6 files changed, 10 insertions, 10 deletions
diff --git a/Zend/zend.c b/Zend/zend.c
index a38201baeb..847fbada4d 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -1774,12 +1774,12 @@ ZEND_API void zend_map_ptr_extend(size_t last)
}
}
-void zend_startup_error_notify_callbacks()
+void zend_startup_error_notify_callbacks(void)
{
zend_llist_init(&zend_error_notify_callbacks, sizeof(zend_error_notify_cb), NULL, 1);
}
-void zend_shutdown_error_notify_callbacks()
+void zend_shutdown_error_notify_callbacks(void)
{
zend_llist_destroy(&zend_error_notify_callbacks);
}
diff --git a/Zend/zend.h b/Zend/zend.h
index 659466322e..5963ca7d9a 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -355,8 +355,8 @@ typedef void (*zend_error_notify_cb)(int type, const char *error_filename, uint3
BEGIN_EXTERN_C()
ZEND_API void zend_register_error_notify_callback(zend_error_notify_cb callback);
-void zend_startup_error_notify_callbacks();
-void zend_shutdown_error_notify_callbacks();
+void zend_startup_error_notify_callbacks(void);
+void zend_shutdown_error_notify_callbacks(void);
void zend_error_notify_all_callbacks(int type, const char *error_filename, uint32_t error_lineno, zend_string *message);
END_EXTERN_C()
diff --git a/Zend/zend_cpuinfo.h b/Zend/zend_cpuinfo.h
index 0b6b54e51a..b8b08e7ad0 100644
--- a/Zend/zend_cpuinfo.h
+++ b/Zend/zend_cpuinfo.h
@@ -97,7 +97,7 @@ typedef enum _zend_cpu_feature {
/*intentionally don't support = (1<<31 | ZEND_CPU_EDX_MASK)*/
} zend_cpu_feature;
-void zend_cpu_startup();
+void zend_cpu_startup(void);
ZEND_API int zend_cpu_supports(zend_cpu_feature feature);
#ifndef __has_attribute
diff --git a/Zend/zend_exceptions.c b/Zend/zend_exceptions.c
index 753bcd4b4a..be0eb1c33e 100644
--- a/Zend/zend_exceptions.c
+++ b/Zend/zend_exceptions.c
@@ -998,7 +998,7 @@ ZEND_API ZEND_COLD void zend_throw_exception_object(zval *exception) /* {{{ */
}
/* }}} */
-ZEND_API ZEND_COLD void zend_throw_unwind_exit()
+ZEND_API ZEND_COLD void zend_throw_unwind_exit(void)
{
ZEND_ASSERT(!EG(exception));
EG(exception) = zend_objects_new(&zend_ce_unwind_exit);
diff --git a/Zend/zend_weakrefs.c b/Zend/zend_weakrefs.c
index ec3d81fbb0..8a444c214e 100644
--- a/Zend/zend_weakrefs.c
+++ b/Zend/zend_weakrefs.c
@@ -140,7 +140,7 @@ static void zend_weakref_unregister(zend_object *object, void *payload) {
}
}
-void zend_weakrefs_init() {
+void zend_weakrefs_init(void) {
zend_hash_init(&EG(weakrefs), 8, NULL, NULL, 0);
}
@@ -158,7 +158,7 @@ void zend_weakrefs_notify(zend_object *object) {
}
}
-void zend_weakrefs_shutdown() {
+void zend_weakrefs_shutdown(void) {
zend_ulong obj_addr;
void *tagged_ptr;
ZEND_HASH_FOREACH_NUM_KEY_PTR(&EG(weakrefs), obj_addr, tagged_ptr) {
diff --git a/Zend/zend_weakrefs.h b/Zend/zend_weakrefs.h
index cf902f3dd4..2cce74524f 100644
--- a/Zend/zend_weakrefs.h
+++ b/Zend/zend_weakrefs.h
@@ -23,8 +23,8 @@ extern ZEND_API zend_class_entry *zend_ce_weakref;
void zend_register_weakref_ce(void);
-void zend_weakrefs_init();
-void zend_weakrefs_shutdown();
+void zend_weakrefs_init(void);
+void zend_weakrefs_shutdown(void);
ZEND_API void zend_weakrefs_notify(zend_object *object);