Skip to content

Commit

Permalink
fix [-Wstrict-prototypes] buid warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
remicollet committed Nov 24, 2021
1 parent 435a5ac commit ef2fd0e
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Zend/zend_cpuinfo.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static bool is_avx_supported() {
return 1;
}
#else
static bool is_avx_supported() {
static bool is_avx_supported(void) {
return 0;
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_cpuinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -215,7 +215,7 @@ static inline int zend_cpu_supports_pclmul() {
return __builtin_cpu_supports("pclmul");
}
#else
static inline int zend_cpu_supports_pclmul() {
static inline int zend_cpu_supports_pclmul(void) {
return zend_cpu_supports(ZEND_CPU_FEATURE_PCLMULQDQ);
}
#endif
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_exceptions.c
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ void zend_exception_restore(void) /* {{{ */
}
/* }}} */

static zend_always_inline bool is_handle_exception_set() {
static zend_always_inline bool is_handle_exception_set(void) {
zend_execute_data *execute_data = EG(current_execute_data);
return !execute_data->func
|| !ZEND_USER_CODE(execute_data->func->common.type)
Expand Down
2 changes: 1 addition & 1 deletion Zend/zend_object_handlers.c
Original file line number Diff line number Diff line change
Expand Up @@ -727,7 +727,7 @@ ZEND_API zval *zend_std_read_property(zend_object *zobj, zend_string *name, int
}
/* }}} */

static zend_always_inline bool property_uses_strict_types() {
static zend_always_inline bool property_uses_strict_types(void) {
zend_execute_data *execute_data = EG(current_execute_data);
return execute_data
&& execute_data->func
Expand Down
2 changes: 1 addition & 1 deletion ext/hash/murmur/endianness.h
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ static const union {
uint8_t u8[2];
uint16_t u16;
} EndianMix = {{ 1, 0 }};
FORCE_INLINE int IsBigEndian()
FORCE_INLINE int IsBigEndian(void)
{
// Constant-folded by the compiler.
return EndianMix.u16 != 1;
Expand Down
2 changes: 1 addition & 1 deletion ext/spl/spl_dllist.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ static inline spl_dllist_object *spl_dllist_from_obj(zend_object *obj) /* {{{ */

#define Z_SPLDLLIST_P(zv) spl_dllist_from_obj(Z_OBJ_P((zv)))

static spl_ptr_llist *spl_ptr_llist_init() /* {{{ */
static spl_ptr_llist *spl_ptr_llist_init(void) /* {{{ */
{
spl_ptr_llist *llist = emalloc(sizeof(spl_ptr_llist));

Expand Down
2 changes: 1 addition & 1 deletion sapi/cli/php_cli_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -2371,7 +2371,7 @@ static char *php_cli_server_parse_addr(const char *addr, int *pport) {
return pestrndup(addr, end - addr, 1);
}

static void php_cli_server_startup_workers() {
static void php_cli_server_startup_workers(void) {
char *workers = getenv("PHP_CLI_SERVER_WORKERS");
if (!workers) {
return;
Expand Down

0 comments on commit ef2fd0e

Please sign in to comment.