Skip to content

Commit 1b85e74

Browse files
twosenikic
authored andcommitted
Fix warning of strict-prototypes
Closes phpGH-5673.
1 parent 68fdad8 commit 1b85e74

19 files changed

+26
-26
lines changed

TSRM/TSRM.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,11 @@ TSRM_API void tsrm_shutdown(void)
228228

229229
/* {{{ */
230230
/* environ lock api */
231-
TSRM_API void tsrm_env_lock() {
231+
TSRM_API void tsrm_env_lock(void) {
232232
tsrm_mutex_lock(tsrm_env_mutex);
233233
}
234234

235-
TSRM_API void tsrm_env_unlock() {
235+
TSRM_API void tsrm_env_unlock(void) {
236236
tsrm_mutex_unlock(tsrm_env_mutex);
237237
} /* }}} */
238238

TSRM/TSRM.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,8 @@ TSRM_API int tsrm_startup(int expected_threads, int expected_resources, int debu
8383
TSRM_API void tsrm_shutdown(void);
8484

8585
/* environ lock API */
86-
TSRM_API void tsrm_env_lock();
87-
TSRM_API void tsrm_env_unlock();
86+
TSRM_API void tsrm_env_lock(void);
87+
TSRM_API void tsrm_env_unlock(void);
8888

8989
/* allocates a new thread-safe-resource id */
9090
TSRM_API ts_rsrc_id ts_allocate_id(ts_rsrc_id *rsrc_id, size_t size, ts_allocate_ctor ctor, ts_allocate_dtor dtor);

Zend/zend_gc.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -1611,7 +1611,7 @@ ZEND_API void zend_gc_get_status(zend_gc_status *status)
16111611
status->num_roots = GC_G(num_roots);
16121612
}
16131613

1614-
ZEND_API zend_get_gc_buffer *zend_get_gc_buffer_create() {
1614+
ZEND_API zend_get_gc_buffer *zend_get_gc_buffer_create(void) {
16151615
/* There can only be one get_gc() call active at a time,
16161616
* so there only needs to be one buffer. */
16171617
zend_get_gc_buffer *gc_buffer = &EG(get_gc_buffer);

Zend/zend_gc.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ typedef struct {
9494
zval *start;
9595
} zend_get_gc_buffer;
9696

97-
ZEND_API zend_get_gc_buffer *zend_get_gc_buffer_create();
97+
ZEND_API zend_get_gc_buffer *zend_get_gc_buffer_create(void);
9898
ZEND_API void zend_get_gc_buffer_grow(zend_get_gc_buffer *gc_buffer);
9999

100100
static zend_always_inline void zend_get_gc_buffer_add_zval(

ext/date/php_date.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ static inline long long php_date_llabs( long long i ) { return i >= 0 ? i : -i;
5858
#endif
5959
#endif
6060

61-
PHPAPI time_t php_time()
61+
PHPAPI time_t php_time(void)
6262
{
6363
#ifdef HAVE_GETTIMEOFDAY
6464
struct timeval tm;

ext/date/php_date.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ ZEND_END_MODULE_GLOBALS(date)
105105

106106
#define DATEG(v) ZEND_MODULE_GLOBALS_ACCESSOR(date, v)
107107

108-
PHPAPI time_t php_time();
108+
PHPAPI time_t php_time(void);
109109

110110
/* Backwards compatibility wrapper */
111111
PHPAPI zend_long php_parse_date(char *string, zend_long *now);

ext/gmp/gmp.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ ZEND_GET_MODULE(gmp)
6868
static zend_class_entry *gmp_ce;
6969
static zend_object_handlers gmp_object_handlers;
7070

71-
PHP_GMP_API zend_class_entry *php_gmp_class_entry() {
71+
PHP_GMP_API zend_class_entry *php_gmp_class_entry(void) {
7272
return gmp_ce;
7373
}
7474

ext/gmp/php_gmp_int.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ static inline gmp_object *php_gmp_object_from_zend_object(zend_object *zobj) {
2525
return (gmp_object *)( ((char *)zobj) - XtOffsetOf(gmp_object, std) );
2626
}
2727

28-
PHP_GMP_API zend_class_entry *php_gmp_class_entry();
28+
PHP_GMP_API zend_class_entry *php_gmp_class_entry(void);
2929

3030
/* GMP and MPIR use different datatypes on different platforms */
3131
#ifdef PHP_WIN32

ext/mysqlnd/mysqlnd.h

+4-4
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,9 @@
6060
PHPAPI void mysqlnd_library_init(void);
6161
PHPAPI void mysqlnd_library_end(void);
6262

63-
PHPAPI unsigned int mysqlnd_plugin_register();
63+
PHPAPI unsigned int mysqlnd_plugin_register(void);
6464
PHPAPI unsigned int mysqlnd_plugin_register_ex(struct st_mysqlnd_plugin_header * plugin);
65-
PHPAPI unsigned int mysqlnd_plugin_count();
65+
PHPAPI unsigned int mysqlnd_plugin_count(void);
6666
PHPAPI void * mysqlnd_plugin_find(const char * const name);
6767

6868
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
155155
#define mysqlnd_fetch_fields(result) (result)->m.fetch_fields((result))
156156

157157
/* mysqlnd metadata */
158-
PHPAPI const char * mysqlnd_get_client_info();
159-
PHPAPI unsigned long mysqlnd_get_client_version();
158+
PHPAPI const char * mysqlnd_get_client_info(void);
159+
PHPAPI unsigned long mysqlnd_get_client_version(void);
160160

161161
#define mysqlnd_ssl_set(conn, key, cert, ca, capath, cipher) ((conn)->data)->m->ssl_set((conn)->data, (key), (cert), (ca), (capath), (cipher))
162162

ext/mysqlnd/mysqlnd_connection.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -1366,15 +1366,15 @@ MYSQLND_METHOD(mysqlnd_conn_data, info)(const MYSQLND_CONN_DATA * const conn)
13661366

13671367

13681368
/* {{{ mysqlnd_get_client_info */
1369-
PHPAPI const char * mysqlnd_get_client_info()
1369+
PHPAPI const char * mysqlnd_get_client_info(void)
13701370
{
13711371
return PHP_MYSQLND_VERSION;
13721372
}
13731373
/* }}} */
13741374

13751375

13761376
/* {{{ mysqlnd_get_client_version */
1377-
PHPAPI unsigned long mysqlnd_get_client_version()
1377+
PHPAPI unsigned long mysqlnd_get_client_version(void)
13781378
{
13791379
return MYSQLND_VERSION_ID;
13801380
}

ext/mysqlnd/mysqlnd_plugin.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ mysqlnd_plugin_subsystem_end(void)
125125

126126

127127
/* {{{ mysqlnd_plugin_register */
128-
PHPAPI unsigned int mysqlnd_plugin_register()
128+
PHPAPI unsigned int mysqlnd_plugin_register(void)
129129
{
130130
return mysqlnd_plugin_register_ex(NULL);
131131
}
@@ -181,7 +181,7 @@ PHPAPI void mysqlnd_plugin_apply_with_argument(apply_func_arg_t apply_func, void
181181

182182

183183
/* {{{ mysqlnd_plugin_count */
184-
PHPAPI unsigned int mysqlnd_plugin_count()
184+
PHPAPI unsigned int mysqlnd_plugin_count(void)
185185
{
186186
return mysqlnd_plugins_counter;
187187
}

ext/mysqlnd/mysqlnd_result_meta.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -309,7 +309,7 @@ mysqlnd_result_meta_init(MYSQLND_RES *result, unsigned int field_count)
309309

310310
/* {{{ mysqlnd_res_meta_get_methods */
311311
PHPAPI struct st_mysqlnd_res_meta_methods *
312-
mysqlnd_result_metadata_get_methods()
312+
mysqlnd_result_metadata_get_methods(void)
313313
{
314314
return &mysqlnd_mysqlnd_res_meta_methods;
315315
}

ext/mysqlnd/mysqlnd_result_meta.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
#define MYSQLND_RESULT_META_H
2121

2222
PHPAPI MYSQLND_RES_METADATA * mysqlnd_result_meta_init(MYSQLND_RES * result, unsigned int field_count);
23-
PHPAPI struct st_mysqlnd_res_meta_methods * mysqlnd_result_metadata_get_methods();
23+
PHPAPI struct st_mysqlnd_res_meta_methods * mysqlnd_result_metadata_get_methods(void);
2424
PHPAPI void ** _mysqlnd_plugin_get_plugin_result_metadata_data(const MYSQLND_RES_METADATA * meta, unsigned int plugin_id);
2525

2626
#endif /* MYSQLND_RESULT_META_H */

ext/simplexml/php_simplexml.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,6 @@ typedef struct {
7777
# define PHP_SXE_API ZEND_API
7878
#endif
7979

80-
PHP_SXE_API zend_class_entry *sxe_get_element_class_entry();
80+
PHP_SXE_API zend_class_entry *sxe_get_element_class_entry(void);
8181

8282
#endif

ext/simplexml/simplexml.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535

3636
zend_class_entry *sxe_class_entry = NULL;
3737

38-
PHP_SXE_API zend_class_entry *sxe_get_element_class_entry() /* {{{ */
38+
PHP_SXE_API zend_class_entry *sxe_get_element_class_entry(void) /* {{{ */
3939
{
4040
return sxe_class_entry;
4141
}

ext/standard/password.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ PHP_MSHUTDOWN_FUNCTION(password) /* {{{ */
468468
}
469469
/* }}} */
470470

471-
const php_password_algo* php_password_algo_default() {
471+
const php_password_algo* php_password_algo_default(void) {
472472
return &php_password_algo_bcrypt;
473473
}
474474

ext/standard/php_password.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ extern const php_password_algo php_password_algo_argon2id;
5151

5252
PHPAPI int php_password_algo_register(const char*, const php_password_algo*);
5353
PHPAPI void php_password_algo_unregister(const char*);
54-
PHPAPI const php_password_algo* php_password_algo_default();
54+
PHPAPI const php_password_algo* php_password_algo_default(void);
5555
PHPAPI zend_string *php_password_algo_extract_ident(const zend_string*);
5656
PHPAPI const php_password_algo* php_password_algo_find(const zend_string*);
5757

sapi/cli/cli.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,6 @@ typedef struct {
3434
int (*cli_shell_run)(void);
3535
} cli_shell_callbacks_t;
3636

37-
extern PHP_CLI_API cli_shell_callbacks_t *php_cli_get_shell_callbacks();
37+
extern PHP_CLI_API cli_shell_callbacks_t *php_cli_get_shell_callbacks(void);
3838

3939
#endif /* CLI_H */

sapi/cli/php_cli.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ static DWORD orig_cp = 0;
118118
#define PHP_MODE_SHOW_INI_CONFIG 13
119119

120120
cli_shell_callbacks_t cli_shell_callbacks = { NULL, NULL, NULL };
121-
PHP_CLI_API cli_shell_callbacks_t *php_cli_get_shell_callbacks()
121+
PHP_CLI_API cli_shell_callbacks_t *php_cli_get_shell_callbacks(void)
122122
{
123123
return &cli_shell_callbacks;
124124
}

0 commit comments

Comments
 (0)