]> granicus.if.org Git - php/commitdiff
Fix warnings of strict-prototypes
authortwosee <twose@qq.com>
Wed, 22 Jul 2020 16:59:00 +0000 (00:59 +0800)
committertwosee <twose@qq.com>
Wed, 22 Jul 2020 16:59:00 +0000 (00:59 +0800)
Closes GH-5887.

Zend/zend.c
Zend/zend.h
Zend/zend_cpuinfo.h
Zend/zend_exceptions.c
Zend/zend_weakrefs.c
Zend/zend_weakrefs.h
ext/standard/var.c
ext/standard/var_unserializer.re
main/main.c
win32/sendmail.c

index a38201baeb3046085f842217b18c0f3a99341147..847fbada4db08770a3963f01f66727baccfa4a5c 100644 (file)
@@ -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);
 }
index 659466322e4449967c2f477c0fa53cebc4cba07f..5963ca7d9a7ac51284c204dfc269e8e3687903ee 100644 (file)
@@ -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()
 
index 0b6b54e51a392a0c075a59cae580ccaa27676593..b8b08e7ad06ef2c22160e15f26925678c944d076 100644 (file)
@@ -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
index 753bcd4b4abc0cbce77fbc1f18c60ca1fc3084ca..be0eb1c33eb8fe91210969377414e6ba17d852cd 100644 (file)
@@ -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);
index ec3d81fbb0a6a013caf5215086507d3475dd9935..8a444c214e9e140d77db27386de356939c8b2889 100644 (file)
@@ -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) {
index cf902f3dd49726c3ce0a20ad921ade155f9750ee..2cce74524fad0c1184db9ff1e7a8082cf95114cc 100644 (file)
@@ -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);
 
index 17540f56cd3b25ecff40513ee092c3bb974e99c5..e835666ddb3bc2f67a072b56a7ff2e7de83a78e3 100644 (file)
@@ -1114,7 +1114,7 @@ PHPAPI void php_var_serialize(smart_str *buf, zval *struc, php_serialize_data_t
 }
 /* }}} */
 
-PHPAPI php_serialize_data_t php_var_serialize_init() {
+PHPAPI php_serialize_data_t php_var_serialize_init(void) {
        struct php_serialize_data *d;
        /* fprintf(stderr, "SERIALIZE_INIT      == lock: %u, level: %u\n", BG(serialize_lock), BG(serialize).level); */
        if (BG(serialize_lock) || !BG(serialize).level) {
index 8df84805016abb43fc92329afebb1a98bad04c15..1fc0e0dcda9ba4e1fe335503bbcd788abb800055 100644 (file)
@@ -52,7 +52,7 @@ struct php_unserialize_data {
        var_entries       entries;
 };
 
-PHPAPI php_unserialize_data_t php_var_unserialize_init() {
+PHPAPI php_unserialize_data_t php_var_unserialize_init(void) {
        php_unserialize_data_t d;
        /* fprintf(stderr, "UNSERIALIZE_INIT    == lock: %u, level: %u\n", BG(serialize_lock), BG(unserialize).level); */
        if (BG(serialize_lock) || !BG(unserialize).level) {
index 9c0c8c11b9b267827f83dc0ffa5055f22a7f0f75..cc0e76456187107d2ecef94e6532a0cf4dca5d11 100644 (file)
@@ -522,7 +522,7 @@ static PHP_INI_DISP(display_errors_mode)
 }
 /* }}} */
 
-PHPAPI const char *php_get_internal_encoding() {
+PHPAPI const char *php_get_internal_encoding(void) {
        if (PG(internal_encoding) && PG(internal_encoding)[0]) {
                return PG(internal_encoding);
        } else if (SG(default_charset) && SG(default_charset)[0]) {
@@ -531,7 +531,7 @@ PHPAPI const char *php_get_internal_encoding() {
        return "UTF-8";
 }
 
-PHPAPI const char *php_get_input_encoding() {
+PHPAPI const char *php_get_input_encoding(void) {
        if (PG(input_encoding) && PG(input_encoding)[0]) {
                return PG(input_encoding);
        } else if (SG(default_charset) && SG(default_charset)[0]) {
@@ -540,7 +540,7 @@ PHPAPI const char *php_get_input_encoding() {
        return "UTF-8";
 }
 
-PHPAPI const char *php_get_output_encoding() {
+PHPAPI const char *php_get_output_encoding(void) {
        if (PG(output_encoding) && PG(output_encoding)[0]) {
                return PG(output_encoding);
        } else if (SG(default_charset) && SG(default_charset)[0]) {
index ff57da88c2db61fa8f0bea32fb11fb7bed201cf2..3d73ef9b5b3e55265a204b597e96a06678935fd9 100644 (file)
@@ -300,7 +300,7 @@ PHPAPI int TSendMail(const char *host, int *error, char **error_message,
 // Author/Date:  jcar 20/9/96
 // History:
 //********************************************************************/
-PHPAPI void TSMClose()
+PHPAPI void TSMClose(void)
 {
        Post("QUIT\r\n");
        Ack(NULL);