Skip to content

Fix warning of strict-prototypes #5887

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Zend/zend.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
4 changes: 2 additions & 2 deletions Zend/zend.h
Original file line number Diff line number Diff line change
Expand Up @@ -356,8 +356,8 @@ typedef void (*zend_error_notify_cb)(int type, const char *error_filename, uint3
BEGIN_EXTERN_C()

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

Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_cpuinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
4 changes: 2 additions & 2 deletions Zend/zend_weakrefs.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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) {
Expand Down
4 changes: 2 additions & 2 deletions Zend/zend_weakrefs.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion ext/standard/var.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
2 changes: 1 addition & 1 deletion ext/standard/var_unserializer.re
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 3 additions & 3 deletions main/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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]) {
Expand All @@ -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]) {
Expand All @@ -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]) {
Expand Down
2 changes: 1 addition & 1 deletion win32/sendmail.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down