Skip to content

Commit 6e92487

Browse files
committed
Fix warnings of strict-prototypes
Closes phpGH-5887.
1 parent a65ec4c commit 6e92487

File tree

10 files changed

+16
-16
lines changed

10 files changed

+16
-16
lines changed

Zend/zend.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1774,12 +1774,12 @@ ZEND_API void zend_map_ptr_extend(size_t last)
17741774
}
17751775
}
17761776

1777-
void zend_startup_error_notify_callbacks()
1777+
void zend_startup_error_notify_callbacks(void)
17781778
{
17791779
zend_llist_init(&zend_error_notify_callbacks, sizeof(zend_error_notify_cb), NULL, 1);
17801780
}
17811781

1782-
void zend_shutdown_error_notify_callbacks()
1782+
void zend_shutdown_error_notify_callbacks(void)
17831783
{
17841784
zend_llist_destroy(&zend_error_notify_callbacks);
17851785
}

Zend/zend.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -355,8 +355,8 @@ typedef void (*zend_error_notify_cb)(int type, const char *error_filename, uint3
355355

356356
BEGIN_EXTERN_C()
357357
ZEND_API void zend_register_error_notify_callback(zend_error_notify_cb callback);
358-
void zend_startup_error_notify_callbacks();
359-
void zend_shutdown_error_notify_callbacks();
358+
void zend_startup_error_notify_callbacks(void);
359+
void zend_shutdown_error_notify_callbacks(void);
360360
void zend_error_notify_all_callbacks(int type, const char *error_filename, uint32_t error_lineno, zend_string *message);
361361
END_EXTERN_C()
362362

Zend/zend_cpuinfo.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ typedef enum _zend_cpu_feature {
9797
/*intentionally don't support = (1<<31 | ZEND_CPU_EDX_MASK)*/
9898
} zend_cpu_feature;
9999

100-
void zend_cpu_startup();
100+
void zend_cpu_startup(void);
101101
ZEND_API int zend_cpu_supports(zend_cpu_feature feature);
102102

103103
#ifndef __has_attribute

Zend/zend_exceptions.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -998,7 +998,7 @@ ZEND_API ZEND_COLD void zend_throw_exception_object(zval *exception) /* {{{ */
998998
}
999999
/* }}} */
10001000

1001-
ZEND_API ZEND_COLD void zend_throw_unwind_exit()
1001+
ZEND_API ZEND_COLD void zend_throw_unwind_exit(void)
10021002
{
10031003
ZEND_ASSERT(!EG(exception));
10041004
EG(exception) = zend_objects_new(&zend_ce_unwind_exit);

Zend/zend_weakrefs.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ static void zend_weakref_unregister(zend_object *object, void *payload) {
140140
}
141141
}
142142

143-
void zend_weakrefs_init() {
143+
void zend_weakrefs_init(void) {
144144
zend_hash_init(&EG(weakrefs), 8, NULL, NULL, 0);
145145
}
146146

@@ -158,7 +158,7 @@ void zend_weakrefs_notify(zend_object *object) {
158158
}
159159
}
160160

161-
void zend_weakrefs_shutdown() {
161+
void zend_weakrefs_shutdown(void) {
162162
zend_ulong obj_addr;
163163
void *tagged_ptr;
164164
ZEND_HASH_FOREACH_NUM_KEY_PTR(&EG(weakrefs), obj_addr, tagged_ptr) {

Zend/zend_weakrefs.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ extern ZEND_API zend_class_entry *zend_ce_weakref;
2323

2424
void zend_register_weakref_ce(void);
2525

26-
void zend_weakrefs_init();
27-
void zend_weakrefs_shutdown();
26+
void zend_weakrefs_init(void);
27+
void zend_weakrefs_shutdown(void);
2828

2929
ZEND_API void zend_weakrefs_notify(zend_object *object);
3030

ext/standard/var.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ PHPAPI void php_var_serialize(smart_str *buf, zval *struc, php_serialize_data_t
11141114
}
11151115
/* }}} */
11161116

1117-
PHPAPI php_serialize_data_t php_var_serialize_init() {
1117+
PHPAPI php_serialize_data_t php_var_serialize_init(void) {
11181118
struct php_serialize_data *d;
11191119
/* fprintf(stderr, "SERIALIZE_INIT == lock: %u, level: %u\n", BG(serialize_lock), BG(serialize).level); */
11201120
if (BG(serialize_lock) || !BG(serialize).level) {

ext/standard/var_unserializer.re

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ struct php_unserialize_data {
5252
var_entries entries;
5353
};
5454

55-
PHPAPI php_unserialize_data_t php_var_unserialize_init() {
55+
PHPAPI php_unserialize_data_t php_var_unserialize_init(void) {
5656
php_unserialize_data_t d;
5757
/* fprintf(stderr, "UNSERIALIZE_INIT == lock: %u, level: %u\n", BG(serialize_lock), BG(unserialize).level); */
5858
if (BG(serialize_lock) || !BG(unserialize).level) {

main/main.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ static PHP_INI_DISP(display_errors_mode)
522522
}
523523
/* }}} */
524524

525-
PHPAPI const char *php_get_internal_encoding() {
525+
PHPAPI const char *php_get_internal_encoding(void) {
526526
if (PG(internal_encoding) && PG(internal_encoding)[0]) {
527527
return PG(internal_encoding);
528528
} else if (SG(default_charset) && SG(default_charset)[0]) {
@@ -531,7 +531,7 @@ PHPAPI const char *php_get_internal_encoding() {
531531
return "UTF-8";
532532
}
533533

534-
PHPAPI const char *php_get_input_encoding() {
534+
PHPAPI const char *php_get_input_encoding(void) {
535535
if (PG(input_encoding) && PG(input_encoding)[0]) {
536536
return PG(input_encoding);
537537
} else if (SG(default_charset) && SG(default_charset)[0]) {
@@ -540,7 +540,7 @@ PHPAPI const char *php_get_input_encoding() {
540540
return "UTF-8";
541541
}
542542

543-
PHPAPI const char *php_get_output_encoding() {
543+
PHPAPI const char *php_get_output_encoding(void) {
544544
if (PG(output_encoding) && PG(output_encoding)[0]) {
545545
return PG(output_encoding);
546546
} else if (SG(default_charset) && SG(default_charset)[0]) {

win32/sendmail.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -300,7 +300,7 @@ PHPAPI int TSendMail(const char *host, int *error, char **error_message,
300300
// Author/Date: jcar 20/9/96
301301
// History:
302302
//********************************************************************/
303-
PHPAPI void TSMClose()
303+
PHPAPI void TSMClose(void)
304304
{
305305
Post("QUIT\r\n");
306306
Ack(NULL);

0 commit comments

Comments
 (0)