Mark various functions with void arguments.

This fixes a bunch of [-Wstrict-prototypes] warning,
because in C func() and func(void) have different semantics.
This commit is contained in:
George Peter Banyard 2021-05-12 14:55:23 +01:00
parent 320d6050e7
commit c40231afbf
No known key found for this signature in database
GPG Key ID: D49A095D7329F6DC
73 changed files with 163 additions and 163 deletions

View File

@ -2201,7 +2201,7 @@ static void zend_mm_check_leaks(zend_mm_heap *heap)
#if ZEND_MM_CUSTOM
static void *tracked_malloc(size_t size);
static void tracked_free_all();
static void tracked_free_all(void);
#endif
void zend_mm_shutdown(zend_mm_heap *heap, bool full, bool silent)

View File

@ -1298,7 +1298,7 @@ static bool is_generator_compatible_class_type(zend_string *name) {
|| zend_string_equals_literal_ci(name, "Generator");
}
static void zend_mark_function_as_generator() /* {{{ */
static void zend_mark_function_as_generator(void) /* {{{ */
{
if (!CG(active_op_array)->function_name) {
zend_error_noreturn(E_COMPILE_ERROR,
@ -1508,7 +1508,7 @@ static bool zend_try_ct_eval_const(zval *zv, zend_string *name, bool is_fully_qu
}
/* }}} */
static inline bool zend_is_scope_known() /* {{{ */
static inline bool zend_is_scope_known(void) /* {{{ */
{
if (!CG(active_op_array)) {
/* This can only happen when evaluating a default value string. */
@ -2327,7 +2327,7 @@ static void zend_short_circuiting_mark_inner(zend_ast *ast) {
}
}
static uint32_t zend_short_circuiting_checkpoint()
static uint32_t zend_short_circuiting_checkpoint(void)
{
return zend_stack_count(&CG(short_circuiting_opnums));
}
@ -2754,7 +2754,7 @@ static bool is_global_var_fetch(zend_ast *ast)
return ast->kind == ZEND_AST_DIM && is_globals_fetch(ast->child[0]);
}
static bool this_guaranteed_exists() /* {{{ */
static bool this_guaranteed_exists(void) /* {{{ */
{
zend_op_array *op_array = CG(active_op_array);
/* Instance methods always have a $this.

View File

@ -120,7 +120,7 @@ ZEND_API int zend_cpu_supports(zend_cpu_feature feature);
* resolver functions should not depend on any external
* functions */
ZEND_NO_SANITIZE_ADDRESS
static inline int zend_cpu_supports_sse2() {
static inline int zend_cpu_supports_sse2(void) {
#if PHP_HAVE_BUILTIN_CPU_INIT
__builtin_cpu_init();
#endif
@ -128,7 +128,7 @@ static inline int zend_cpu_supports_sse2() {
}
ZEND_NO_SANITIZE_ADDRESS
static inline int zend_cpu_supports_sse3() {
static inline int zend_cpu_supports_sse3(void) {
#if PHP_HAVE_BUILTIN_CPU_INIT
__builtin_cpu_init();
#endif
@ -136,7 +136,7 @@ static inline int zend_cpu_supports_sse3() {
}
ZEND_NO_SANITIZE_ADDRESS
static inline int zend_cpu_supports_ssse3() {
static inline int zend_cpu_supports_ssse3(void) {
#if PHP_HAVE_BUILTIN_CPU_INIT
__builtin_cpu_init();
#endif
@ -144,7 +144,7 @@ static inline int zend_cpu_supports_ssse3() {
}
ZEND_NO_SANITIZE_ADDRESS
static inline int zend_cpu_supports_sse41() {
static inline int zend_cpu_supports_sse41(void) {
#if PHP_HAVE_BUILTIN_CPU_INIT
__builtin_cpu_init();
#endif
@ -152,7 +152,7 @@ static inline int zend_cpu_supports_sse41() {
}
ZEND_NO_SANITIZE_ADDRESS
static inline int zend_cpu_supports_sse42() {
static inline int zend_cpu_supports_sse42(void) {
#if PHP_HAVE_BUILTIN_CPU_INIT
__builtin_cpu_init();
#endif
@ -160,7 +160,7 @@ static inline int zend_cpu_supports_sse42() {
}
ZEND_NO_SANITIZE_ADDRESS
static inline int zend_cpu_supports_avx() {
static inline int zend_cpu_supports_avx(void) {
#if PHP_HAVE_BUILTIN_CPU_INIT
__builtin_cpu_init();
#endif
@ -168,7 +168,7 @@ static inline int zend_cpu_supports_avx() {
}
ZEND_NO_SANITIZE_ADDRESS
static inline int zend_cpu_supports_avx2() {
static inline int zend_cpu_supports_avx2(void) {
#if PHP_HAVE_BUILTIN_CPU_INIT
__builtin_cpu_init();
#endif
@ -176,31 +176,31 @@ static inline int zend_cpu_supports_avx2() {
}
#else
static inline int zend_cpu_supports_sse2() {
static inline int zend_cpu_supports_sse2(void) {
return zend_cpu_supports(ZEND_CPU_FEATURE_SSE2);
}
static inline int zend_cpu_supports_sse3() {
static inline int zend_cpu_supports_sse3(void) {
return zend_cpu_supports(ZEND_CPU_FEATURE_SSE3);
}
static inline int zend_cpu_supports_ssse3() {
static inline int zend_cpu_supports_ssse3(void) {
return zend_cpu_supports(ZEND_CPU_FEATURE_SSSE3);
}
static inline int zend_cpu_supports_sse41() {
static inline int zend_cpu_supports_sse41(void) {
return zend_cpu_supports(ZEND_CPU_FEATURE_SSE41);
}
static inline int zend_cpu_supports_sse42() {
static inline int zend_cpu_supports_sse42(void) {
return zend_cpu_supports(ZEND_CPU_FEATURE_SSE42);
}
static inline int zend_cpu_supports_avx() {
static inline int zend_cpu_supports_avx(void) {
return zend_cpu_supports(ZEND_CPU_FEATURE_AVX);
}
static inline int zend_cpu_supports_avx2() {
static inline int zend_cpu_supports_avx2(void) {
return zend_cpu_supports(ZEND_CPU_FEATURE_AVX2);
}
#endif

View File

@ -1425,7 +1425,7 @@ next:
return count;
}
static void zend_get_gc_buffer_release();
static void zend_get_gc_buffer_release(void);
ZEND_API int zend_gc_collect_cycles(void)
{

View File

@ -49,7 +49,7 @@ ZEND_API zend_gdbjit_descriptor __jit_debug_descriptor = {
1, ZEND_GDBJIT_NOACTION, NULL, NULL
};
ZEND_API zend_never_inline void __jit_debug_register_code()
ZEND_API zend_never_inline void __jit_debug_register_code(void)
{
__asm__ __volatile__("");
}

View File

@ -2352,7 +2352,7 @@ static int check_variance_obligation(zval *zv) {
return ZEND_HASH_APPLY_REMOVE;
}
static void load_delayed_classes() {
static void load_delayed_classes(void) {
HashTable *delayed_autoloads = CG(delayed_autoloads);
zend_string *name;

View File

@ -1277,7 +1277,7 @@ static zend_result exit_nesting(char closing)
return SUCCESS;
}
static zend_result check_nesting_at_end()
static zend_result check_nesting_at_end(void)
{
if (!zend_stack_is_empty(&SCNG(nest_location_stack))) {
zend_nest_location *nest_loc = zend_stack_top(&SCNG(nest_location_stack));

View File

@ -48,6 +48,6 @@ int cdb_find(struct cdb *, char *, unsigned int);
#define cdb_datapos(c) ((c)->dpos)
#define cdb_datalen(c) ((c)->dlen)
char *cdb_version();
char *cdb_version(void);
#endif

View File

@ -55,6 +55,6 @@ int cdb_make_addbegin(struct cdb_make *, unsigned int, unsigned int);
int cdb_make_addend(struct cdb_make *, unsigned int, unsigned int, uint32);
int cdb_make_add(struct cdb_make *, char *, unsigned int, char *, unsigned int);
int cdb_make_finish(struct cdb_make *);
char *cdb_make_version();
char *cdb_make_version(void);
#endif

View File

@ -39,6 +39,6 @@ int flatfile_delete(flatfile *dba, datum key_datum);
int flatfile_findkey(flatfile *dba, datum key_datum);
datum flatfile_firstkey(flatfile *dba);
datum flatfile_nextkey(flatfile *dba);
char *flatfile_version();
char *flatfile_version(void);
#endif

View File

@ -49,7 +49,7 @@ int inifile_delete_ex(inifile *dba, const key_type *key, bool *found);
int inifile_replace(inifile *dba, const key_type *key, const val_type *val);
int inifile_replace_ex(inifile *dba, const key_type *key, const val_type *val, bool *found);
int inifile_append(inifile *dba, const key_type *key, const val_type *val);
char *inifile_version();
char *inifile_version(void);
key_type inifile_key_split(const char *group_name);
char * inifile_key_string(const key_type *key);

View File

@ -135,7 +135,7 @@ static void _php_image_create_from(INTERNAL_FUNCTION_PARAMETERS, int image_type,
static void _php_image_output(INTERNAL_FUNCTION_PARAMETERS, int image_type, char *tn, void (*func_p)());
static gdIOCtx *create_stream_context_from_zval(zval *to_zval);
static gdIOCtx *create_stream_context(php_stream *stream, int close_stream);
static gdIOCtx *create_output_context();
static gdIOCtx *create_output_context(void);
static int _php_image_type(char data[12]);
/* output streaming (formerly gd_ctx.c) */
@ -215,7 +215,7 @@ void php_gd_assign_libgdimageptr_as_extgdimage(zval *val, gdImagePtr image)
php_gd_exgdimage_from_zobj_p(Z_OBJ_P(val))->image = image;
}
static void php_gd_object_minit_helper()
static void php_gd_object_minit_helper(void)
{
gd_image_ce = register_class_GdImage();
gd_image_ce->create_object = php_gd_image_object_create;

View File

@ -372,9 +372,9 @@ gdImagePtr gdImageCreateFromBmp (FILE * inFile);
gdImagePtr gdImageCreateFromBmpPtr (int size, void *data);
gdImagePtr gdImageCreateFromBmpCtx (gdIOCtxPtr infile);
const char * gdPngGetVersionString();
const char * gdPngGetVersionString(void);
const char * gdJpegGetVersionString();
const char * gdJpegGetVersionString(void);
/* A custom data source. */
/* The source function must return -1 on error, otherwise the number
@ -444,8 +444,8 @@ void gdImageStringUp16(gdImagePtr im, gdFontPtr f, int x, int y, unsigned short
* use of any sort of threads in a module load / shutdown function
* respectively.
*/
void gdFontCacheMutexSetup();
void gdFontCacheMutexShutdown();
void gdFontCacheMutexSetup(void);
void gdFontCacheMutexShutdown(void);
/* 2.0.16: for thread-safe use of gdImageStringFT and friends,
* call this before allowing any thread to call gdImageStringFT.

View File

@ -774,7 +774,7 @@ void gdFontCacheShutdown()
gdMutexUnlock(gdFontCacheMutex);
}
void gdFreeFontCache()
void gdFreeFontCache(void)
{
gdFontCacheShutdown();
}

View File

@ -149,7 +149,7 @@ typedef struct _mbfl_encoding {
MBFLAPI extern const mbfl_encoding *mbfl_name2encoding(const char *name);
MBFLAPI extern const mbfl_encoding *mbfl_no2encoding(enum mbfl_no_encoding no_encoding);
MBFLAPI extern enum mbfl_no_encoding mbfl_name2no_encoding(const char *name);
MBFLAPI extern const mbfl_encoding **mbfl_get_supported_encodings();
MBFLAPI extern const mbfl_encoding **mbfl_get_supported_encodings(void);
MBFLAPI extern const char *mbfl_no_encoding2name(enum mbfl_no_encoding no_encoding);
MBFLAPI extern const char *mbfl_no2preferred_mime_name(enum mbfl_no_encoding no_encoding);
MBFLAPI extern const char *mbfl_encoding_preferred_mime_name(const mbfl_encoding *encoding);

View File

@ -169,7 +169,7 @@ struct st_mysqlnd_plugin__plugin_area_getters mysqlnd_plugin_area_getters =
/* {{{ _mysqlnd_object_factory_get_methods */
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *
_mysqlnd_object_factory_get_methods()
_mysqlnd_object_factory_get_methods(void)
{
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_object_factory);
}
@ -186,7 +186,7 @@ _mysqlnd_object_factory_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_fa
/* {{{ _mysqlnd_conn_get_methods */
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) *
_mysqlnd_conn_get_methods()
_mysqlnd_conn_get_methods(void)
{
return mysqlnd_conn_methods;
}
@ -203,7 +203,7 @@ _mysqlnd_conn_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) *methods)
/* {{{ _mysqlnd_conn_data_get_methods */
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) *
_mysqlnd_conn_data_get_methods()
_mysqlnd_conn_data_get_methods(void)
{
return mysqlnd_conn_data_methods;
}
@ -220,7 +220,7 @@ _mysqlnd_conn_data_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) * m
/* {{{ _mysqlnd_result_get_methods */
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res) *
_mysqlnd_result_get_methods()
_mysqlnd_result_get_methods(void)
{
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_res);
}
@ -238,7 +238,7 @@ _mysqlnd_result_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res) * methods)
/* {{{ _mysqlnd_result_unbuffered_get_methods */
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_unbuffered) *
_mysqlnd_result_unbuffered_get_methods()
_mysqlnd_result_unbuffered_get_methods(void)
{
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_result_unbuffered);
}
@ -256,7 +256,7 @@ _mysqlnd_result_unbuffered_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result
/* {{{ _mysqlnd_result_buffered_get_methods */
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_buffered) *
_mysqlnd_result_buffered_get_methods()
_mysqlnd_result_buffered_get_methods(void)
{
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_result_buffered);
}
@ -274,7 +274,7 @@ _mysqlnd_result_buffered_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_b
/* {{{ _mysqlnd_stmt_get_methods */
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) *
_mysqlnd_stmt_get_methods()
_mysqlnd_stmt_get_methods(void)
{
return mysqlnd_stmt_methods;
}
@ -292,7 +292,7 @@ _mysqlnd_stmt_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) *methods)
/* {{{ _mysqlnd_protocol_payload_decoder_factory_get_methods */
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory) *
_mysqlnd_protocol_payload_decoder_factory_get_methods()
_mysqlnd_protocol_payload_decoder_factory_get_methods(void)
{
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol_payload_decoder_factory);
}
@ -310,7 +310,7 @@ _mysqlnd_protocol_payload_decoder_factory_set_methods(MYSQLND_CLASS_METHODS_TYPE
/* {{{ _mysqlnd_pfc_get_methods */
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) *
_mysqlnd_pfc_get_methods()
_mysqlnd_pfc_get_methods(void)
{
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_protocol_packet_frame_codec);
}
@ -328,7 +328,7 @@ _mysqlnd_pfc_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_fram
/* {{{ _mysqlnd_vio_get_methods */
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) *
_mysqlnd_vio_get_methods()
_mysqlnd_vio_get_methods(void)
{
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_vio);
}
@ -346,7 +346,7 @@ _mysqlnd_vio_set_methods(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) * methods)
/* {{{ mysqlnd_command_factory_get */
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_command) *
_mysqlnd_command_factory_get()
_mysqlnd_command_factory_get(void)
{
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_command);
}
@ -364,7 +364,7 @@ _mysqlnd_command_factory_set(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_command) * metho
/* {{{ _mysqlnd_error_info_get_methods */
static MYSQLND_CLASS_METHODS_TYPE(mysqlnd_error_info) *
_mysqlnd_error_info_get_methods()
_mysqlnd_error_info_get_methods(void)
{
return &MYSQLND_CLASS_METHOD_TABLE_NAME(mysqlnd_error_info);
}

View File

@ -49,73 +49,73 @@ struct st_mysqlnd_plugin_methods_xetters
{
struct st_mnd_object_factory_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) * (*get)();
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_object_factory) *methods);
} object_factory;
struct st_mnd_connection_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) * (*get)();
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn) *methods);
} connection;
struct st_mnd_connection_data_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) * (*get)();
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_conn_data) *methods);
} connection_data;
struct st_mnd_result_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res) * (*get)();
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_res) *methods);
} result;
struct st_mnd_unbuffered_result_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_unbuffered) * (*get)();
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_unbuffered) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_unbuffered) *methods);
} unbuffered_result;
struct st_mnd_buffered_result_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_buffered)* (*get)();
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_buffered)* (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_result_buffered) *methods);
} buffered_result;
struct st_mnd_stmt_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) * (*get)();
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_stmt) * methods);
} statement;
struct st_mnd_protocol_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory)* (*get)();
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory)* (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_payload_decoder_factory) *methods);
} protocol;
struct st_mnd_pfc_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) * (*get)();
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_protocol_packet_frame_codec) * methods);
} pfc;
struct st_mnd_vio_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) * (*get)();
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_vio) * methods);
} vio;
struct st_mnd_error_info_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_error_info) * (*get)();
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_error_info) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_error_info) * methods);
} error_info;
struct st_mnd_command_xetters
{
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_command) * (*get)();
MYSQLND_CLASS_METHODS_TYPE(mysqlnd_command) * (*get)(void);
void (*set)(MYSQLND_CLASS_METHODS_TYPE(mysqlnd_command) * methods);
} command;
};

View File

@ -32,8 +32,8 @@ extern struct st_mysqlnd_perm_bind mysqlnd_ps_fetch_functions[MYSQL_TYPE_LAST +
enum_func_status mysqlnd_fetch_stmt_row_cursor(MYSQLND_RES * result, zval **row_data, const unsigned int flags, bool * fetched_anything);
void _mysqlnd_init_ps_subsystem();/* This one is private, mysqlnd_library_init() will call it */
void _mysqlnd_init_ps_fetch_subsystem();
void _mysqlnd_init_ps_subsystem(void);/* This one is private, mysqlnd_library_init() will call it */
void _mysqlnd_init_ps_fetch_subsystem(void);
void ps_fetch_from_1_to_8_bytes(zval * zv, const MYSQLND_FIELD * const field, const unsigned int pack_len, const zend_uchar ** row, unsigned int byte_count);

View File

@ -4136,7 +4136,7 @@ static zend_class_entry *preload_load_prop_type(zend_property_info *prop, zend_s
return ce;
}
static void preload_ensure_classes_loadable() {
static void preload_ensure_classes_loadable(void) {
/* Run this in a loop, because additional classes may be loaded while updating constants etc. */
uint32_t checked_classes_idx = 0;
while (1) {
@ -4902,8 +4902,8 @@ static int accel_finish_startup(void)
int rc;
int orig_error_reporting;
int (*orig_activate)() = sapi_module.activate;
int (*orig_deactivate)() = sapi_module.deactivate;
int (*orig_activate)(void) = sapi_module.activate;
int (*orig_deactivate)(void) = sapi_module.deactivate;
void (*orig_register_server_variables)(zval *track_vars_array) = sapi_module.register_server_variables;
int (*orig_header_handler)(sapi_header_struct *sapi_header, sapi_header_op_enum op, sapi_headers_struct *sapi_headers) = sapi_module.header_handler;
int (*orig_send_headers)(sapi_headers_struct *sapi_headers) = sapi_module.send_headers;

View File

@ -18,7 +18,7 @@
#include "Zend/zend_API.h"
static ZEND_COLD void undef_result_after_exception() {
static ZEND_COLD void undef_result_after_exception(void) {
const zend_op *opline = EG(opline_before_exception);
ZEND_ASSERT(EG(exception));
if (opline->result_type & (IS_VAR | IS_TMP_VAR)) {

View File

@ -478,7 +478,7 @@ php_stream* php_openssl_get_stream_from_ssl_handle(const SSL *ssl)
return (php_stream*)SSL_get_ex_data(ssl, ssl_stream_data_index);
}
int php_openssl_get_ssl_stream_data_index()
int php_openssl_get_ssl_stream_data_index(void)
{
return ssl_stream_data_index;
}
@ -938,7 +938,7 @@ static void php_openssl_dispose_config(struct php_x509_request * req) /* {{{ */
#else
#define PHP_OPENSSL_RAND_ADD_TIME() php_openssl_rand_add_timeval()
static inline void php_openssl_rand_add_timeval() /* {{{ */
static inline void php_openssl_rand_add_timeval(void) /* {{{ */
{
struct timeval tv;

View File

@ -88,7 +88,7 @@ ZEND_TSRMLS_CACHE_EXTERN();
php_stream_transport_factory_func php_openssl_ssl_socket_factory;
void php_openssl_store_errors();
void php_openssl_store_errors(void);
PHP_OPENSSL_API zend_long php_openssl_cipher_iv_length(const char *method);
PHP_OPENSSL_API zend_string* php_openssl_random_pseudo_bytes(zend_long length);

View File

@ -116,7 +116,7 @@ static RSA *php_openssl_tmp_rsa_cb(SSL *s, int is_export, int keylength);
extern php_stream* php_openssl_get_stream_from_ssl_handle(const SSL *ssl);
extern zend_string* php_openssl_x509_fingerprint(X509 *peer, const char *method, bool raw);
extern int php_openssl_get_ssl_stream_data_index();
extern int php_openssl_get_ssl_stream_data_index(void);
static struct timeval php_openssl_subtract_timeval(struct timeval a, struct timeval b);
static int php_openssl_compare_timeval(struct timeval a, struct timeval b);
static ssize_t php_openssl_sockop_io(int read, php_stream *stream, char *buf, size_t count);

View File

@ -965,14 +965,14 @@ PHPAPI void php_pcre_free_match_data(pcre2_match_data *match_data)
}
}/*}}}*/
static void init_unmatched_null_pair() {
static void init_unmatched_null_pair(void) {
zval val1, val2;
ZVAL_NULL(&val1);
ZVAL_LONG(&val2, -1);
ZVAL_ARR(&PCRE_G(unmatched_null_pair), zend_new_pair(&val1, &val2));
}
static void init_unmatched_empty_pair() {
static void init_unmatched_empty_pair(void) {
zval val1, val2;
ZVAL_EMPTY_STRING(&val1);
ZVAL_LONG(&val2, -1);

View File

@ -513,7 +513,7 @@ static void php_session_save_current_state(int write) /* {{{ */
}
/* }}} */
static void php_session_normalize_vars() /* {{{ */
static void php_session_normalize_vars(void) /* {{{ */
{
PS_ENCODE_VARS;
@ -1938,7 +1938,7 @@ PHP_FUNCTION(session_module_name)
}
/* }}} */
static int save_handler_check_session() {
static int save_handler_check_session(void) {
if (PS(session_status) == php_session_active) {
php_error_docref(NULL, E_WARNING, "Session save handler cannot be changed when a session is active");
return FAILURE;

View File

@ -198,8 +198,8 @@ void whiteSpace_collapse(xmlChar* str);
xmlNodePtr sdl_guess_convert_xml(encodeTypePtr enc, zval* data, int style, xmlNodePtr parent);
zval *sdl_guess_convert_zval(zval *ret, encodeTypePtr enc, xmlNodePtr data);
void encode_finish();
void encode_reset_ns();
void encode_finish(void);
void encode_reset_ns(void);
xmlNsPtr encode_add_ns(xmlNodePtr node, const char* ns);
encodePtr get_conversion(int encode);

View File

@ -247,7 +247,7 @@ PHP_INI_END()
static HashTable defEnc, defEncIndex, defEncNs;
static void php_soap_prepare_globals()
static void php_soap_prepare_globals(void)
{
int i;
const encode* enc;

View File

@ -388,7 +388,7 @@ typedef zend_string *(*base64_decode_func_t)(const unsigned char *, size_t, bool
ZEND_NO_SANITIZE_ADDRESS
ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */
static base64_encode_func_t resolve_base64_encode() {
static base64_encode_func_t resolve_base64_encode(void) {
# if ZEND_INTRIN_AVX2_FUNC_PROTO
if (zend_cpu_supports_avx2()) {
return php_base64_encode_avx2;
@ -404,7 +404,7 @@ static base64_encode_func_t resolve_base64_encode() {
ZEND_NO_SANITIZE_ADDRESS
ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */
static base64_decode_func_t resolve_base64_decode() {
static base64_decode_func_t resolve_base64_decode(void) {
# if ZEND_INTRIN_AVX2_FUNC_PROTO
if (zend_cpu_supports_avx2()) {
return php_base64_decode_ex_avx2;

View File

@ -48,7 +48,7 @@ static double _timer_scale = .0;
#define NANO_IN_SEC 1000000000
/* }}} */
static int _timer_init()
static int _timer_init(void)
{/*{{{*/
#if PHP_HRTIME_PLATFORM_WINDOWS

View File

@ -20,8 +20,8 @@
BEGIN_EXTERN_C()
#include "crypt_freesec.h"
void php_init_crypt_r();
void php_shutdown_crypt_r();
void php_init_crypt_r(void);
void php_shutdown_crypt_r(void);
extern void _crypt_extended_init_r(void);

View File

@ -3648,7 +3648,7 @@ typedef void (*php_stripslashes_func_t)(zend_string *);
ZEND_NO_SANITIZE_ADDRESS
ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */
static php_addslashes_func_t resolve_addslashes() {
static php_addslashes_func_t resolve_addslashes(void) {
if (zend_cpu_supports_sse42()) {
return php_addslashes_sse42;
}
@ -3657,7 +3657,7 @@ static php_addslashes_func_t resolve_addslashes() {
ZEND_NO_SANITIZE_ADDRESS
ZEND_ATTRIBUTE_UNUSED /* clang mistakenly warns about this */
static php_stripslashes_func_t resolve_stripslashes() {
static php_stripslashes_func_t resolve_stripslashes(void) {
if (zend_cpu_supports_sse42()) {
return php_stripslashes_sse42;
}

View File

@ -200,9 +200,9 @@ typedef struct _fcgi_hash {
typedef struct _fcgi_req_hook fcgi_req_hook;
struct _fcgi_req_hook {
void(*on_accept)();
void(*on_read)();
void(*on_close)();
void(*on_accept)(void);
void(*on_read)(void);
void(*on_close)(void);
};
struct _fcgi_request {
@ -875,11 +875,11 @@ void fcgi_set_allowed_clients(char *ip)
}
}
static void fcgi_hook_dummy() {
static void fcgi_hook_dummy(void) {
return;
}
fcgi_request *fcgi_init_request(int listen_socket, void(*on_accept)(), void(*on_read)(), void(*on_close)())
fcgi_request *fcgi_init_request(int listen_socket, void(*on_accept)(void), void(*on_read)(void), void(*on_close)(void))
{
fcgi_request *req = calloc(1, sizeof(fcgi_request));
req->listen_socket = listen_socket;
@ -1324,7 +1324,7 @@ int fcgi_is_closed(fcgi_request *req)
return (req->fd < 0);
}
static int fcgi_is_allowed() {
static int fcgi_is_allowed(void) {
int i;
if (client_sa.sa.sa_family == AF_UNIX) {

View File

@ -91,12 +91,12 @@ void fcgi_close(fcgi_request *req, int force, int destroy);
int fcgi_in_shutdown(void);
void fcgi_terminate(void);
int fcgi_listen(const char *path, int backlog);
fcgi_request* fcgi_init_request(int listen_socket, void(*on_accept)(), void(*on_read)(), void(*on_close)());
fcgi_request* fcgi_init_request(int listen_socket, void(*on_accept)(void), void(*on_read)(void), void(*on_close)(void));
void fcgi_destroy_request(fcgi_request *req);
void fcgi_set_allowed_clients(char *ip);
int fcgi_accept_request(fcgi_request *req);
int fcgi_finish_request(fcgi_request *req, int force_close);
const char *fcgi_get_last_client_ip();
const char *fcgi_get_last_client_ip(void);
void fcgi_set_in_shutdown(int new_value);
void fcgi_request_set_keep(fcgi_request *req, int new_value);

View File

@ -1137,7 +1137,7 @@ PHPAPI void php_html_puts(const char *str, size_t size)
}
/* }}} */
static void clear_last_error() {
static void clear_last_error(void) {
if (PG(last_error_message)) {
zend_string_release(PG(last_error_message));
PG(last_error_message) = NULL;

View File

@ -333,7 +333,7 @@ static inline ZEND_ATTRIBUTE_DEPRECATED void php_set_error_handling(error_handli
{
zend_replace_error_handling(error_handling, exception_class, NULL);
}
static inline ZEND_ATTRIBUTE_DEPRECATED void php_std_error_handling() {}
static inline ZEND_ATTRIBUTE_DEPRECATED void php_std_error_handling(void) {}
PHPAPI ZEND_COLD void php_verror(const char *docref, const char *params, int type, const char *format, va_list args) PHP_ATTRIBUTE_FORMAT(printf, 4, 0);

View File

@ -275,7 +275,7 @@ static void char_ptr_dtor_p(zval *zv) /* {{{ */
pefree(Z_PTR_P(zv), 1);
} /* }}} */
static char *get_last_error() /* {{{ */
static char *get_last_error(void) /* {{{ */
{
return pestrdup(strerror(errno), 1);
} /* }}} */
@ -1102,7 +1102,7 @@ static int php_cli_server_content_sender_pull(php_cli_server_content_sender *sen
} /* }}} */
#if HAVE_UNISTD_H
static int php_cli_is_output_tty() /* {{{ */
static int php_cli_is_output_tty(void) /* {{{ */
{
if (php_cli_output_is_tty == OUTPUT_NOT_CHECKED) {
php_cli_output_is_tty = isatty(STDOUT_FILENO);

View File

@ -31,7 +31,7 @@ extern int get_ps_title(int* displen, const char** string);
extern const char* ps_title_errno(int rc);
extern int is_ps_title_available();
extern int is_ps_title_available(void);
extern void cleanup_ps_args(char **argv);

View File

@ -51,7 +51,7 @@ static int npollfds = 0;
#endif /* HAVE_DEVPOLL */
struct fpm_event_module_s *fpm_event_devpoll_module() /* {{{ */
struct fpm_event_module_s *fpm_event_devpoll_module(void) /* {{{ */
{
#ifdef HAVE_DEVPOLL
return &devpoll_module;

View File

@ -20,6 +20,6 @@
#include "../fpm_config.h"
#include "../fpm_events.h"
struct fpm_event_module_s *fpm_event_devpoll_module();
struct fpm_event_module_s *fpm_event_devpoll_module(void);
#endif /* FPM_EVENTS_DEVPOLL_H */

View File

@ -25,7 +25,7 @@
#include <errno.h>
static int fpm_event_epoll_init(int max);
static int fpm_event_epoll_clean();
static int fpm_event_epoll_clean(void);
static int fpm_event_epoll_wait(struct fpm_event_queue_s *queue, unsigned long int timeout);
static int fpm_event_epoll_add(struct fpm_event_s *ev);
static int fpm_event_epoll_remove(struct fpm_event_s *ev);
@ -46,7 +46,7 @@ static int epollfd = -1;
#endif /* HAVE_EPOLL */
struct fpm_event_module_s *fpm_event_epoll_module() /* {{{ */
struct fpm_event_module_s *fpm_event_epoll_module(void) /* {{{ */
{
#ifdef HAVE_EPOLL
return &epoll_module;

View File

@ -20,6 +20,6 @@
#include "../fpm_config.h"
#include "../fpm_events.h"
struct fpm_event_module_s *fpm_event_epoll_module();
struct fpm_event_module_s *fpm_event_epoll_module(void);
#endif /* FPM_EVENTS_EPOLL_H */

View File

@ -52,7 +52,7 @@ static int kfd = 0;
/*
* Return the module configuration
*/
struct fpm_event_module_s *fpm_event_kqueue_module() /* {{{ */
struct fpm_event_module_s *fpm_event_kqueue_module(void) /* {{{ */
{
#ifdef HAVE_KQUEUE
return &kqueue_module;

View File

@ -20,6 +20,6 @@
#include "../fpm_config.h"
#include "../fpm_events.h"
struct fpm_event_module_s *fpm_event_kqueue_module();
struct fpm_event_module_s *fpm_event_kqueue_module(void);
#endif /* FPM_EVENTS_KQUEUE_H */

View File

@ -26,7 +26,7 @@
#include <string.h>
static int fpm_event_poll_init(int max);
static int fpm_event_poll_clean();
static int fpm_event_poll_clean(void);
static int fpm_event_poll_wait(struct fpm_event_queue_s *queue, unsigned long int timeout);
static int fpm_event_poll_add(struct fpm_event_s *ev);
static int fpm_event_poll_remove(struct fpm_event_s *ev);
@ -50,7 +50,7 @@ static int next_free_slot = 0;
/*
* return the module configuration
*/
struct fpm_event_module_s *fpm_event_poll_module() /* {{{ */
struct fpm_event_module_s *fpm_event_poll_module(void) /* {{{ */
{
#ifdef HAVE_POLL
return &poll_module;

View File

@ -20,6 +20,6 @@
#include "../fpm_config.h"
#include "../fpm_events.h"
struct fpm_event_module_s *fpm_event_poll_module();
struct fpm_event_module_s *fpm_event_poll_module(void);
#endif /* FPM_EVENTS_POLL_H */

View File

@ -47,7 +47,7 @@ static int pfd = -1;
#endif /* HAVE_PORT */
struct fpm_event_module_s *fpm_event_port_module() /* {{{ */
struct fpm_event_module_s *fpm_event_port_module(void) /* {{{ */
{
#ifdef HAVE_PORT
return &port_module;

View File

@ -20,6 +20,6 @@
#include "../fpm_config.h"
#include "../fpm_events.h"
struct fpm_event_module_s *fpm_event_port_module();
struct fpm_event_module_s *fpm_event_port_module(void);
#endif /* FPM_EVENTS_PORT_H */

View File

@ -53,7 +53,7 @@ static fd_set fds;
/*
* return the module configuration
*/
struct fpm_event_module_s *fpm_event_select_module() /* {{{ */
struct fpm_event_module_s *fpm_event_select_module(void) /* {{{ */
{
#ifdef HAVE_SELECT
return &select_module;

View File

@ -20,6 +20,6 @@
#include "../fpm_config.h"
#include "../fpm_events.h"
struct fpm_event_module_s *fpm_event_select_module();
struct fpm_event_module_s *fpm_event_select_module(void);
#endif /* FPM_EVENTS_SELECT_H */

View File

@ -38,7 +38,7 @@ static void fpm_children_cleanup(int which, void *arg) /* {{{ */
}
/* }}} */
static struct fpm_child_s *fpm_child_alloc() /* {{{ */
static struct fpm_child_s *fpm_child_alloc(void) /* {{{ */
{
struct fpm_child_s *ret;

View File

@ -12,8 +12,8 @@
int fpm_children_create_initial(struct fpm_worker_pool_s *wp);
int fpm_children_free(struct fpm_child_s *child);
void fpm_children_bury();
int fpm_children_init_main();
void fpm_children_bury(void);
int fpm_children_init_main(void);
int fpm_children_make(struct fpm_worker_pool_s *wp, int in_event_loop, int nb_to_spawn, int is_debug);
struct fpm_child_s;

View File

@ -5,7 +5,7 @@
#include <sys/time.h>
int fpm_clock_init();
int fpm_clock_init(void);
int fpm_clock_get(struct timeval *tv);
#endif

View File

@ -593,7 +593,7 @@ static char *fpm_conf_set_array(zval *key, zval *value, void **config, int conve
}
/* }}} */
static void *fpm_worker_pool_config_alloc() /* {{{ */
static void *fpm_worker_pool_config_alloc(void) /* {{{ */
{
struct fpm_worker_pool_s *wp;
@ -795,7 +795,7 @@ static int fpm_evaluate_full_path(char **path, struct fpm_worker_pool_s *wp, cha
}
/* }}} */
static int fpm_conf_process_all_pools() /* {{{ */
static int fpm_conf_process_all_pools(void) /* {{{ */
{
struct fpm_worker_pool_s *wp, *wp2;
@ -1659,7 +1659,7 @@ int fpm_conf_load_ini_file(char *filename) /* {{{ */
}
/* }}} */
static void fpm_conf_dump() /* {{{ */
static void fpm_conf_dump(void) /* {{{ */
{
struct fpm_worker_pool_s *wp;

View File

@ -119,7 +119,7 @@ enum {
int fpm_conf_init_main(int test_conf, int force_daemon);
int fpm_worker_pool_config_free(struct fpm_worker_pool_config_s *wpc);
int fpm_conf_write_pid();
int fpm_conf_unlink_pid();
int fpm_conf_write_pid(void);
int fpm_conf_unlink_pid(void);
#endif

View File

@ -8,7 +8,7 @@
#define SETPROCTITLE_PREFIX "php-fpm: "
int fpm_env_init_child(struct fpm_worker_pool_s *wp);
int fpm_env_init_main();
int fpm_env_init_main(void);
void fpm_env_setproctitle(char *title);
extern char **environ;
@ -18,7 +18,7 @@ int setenv(char *name, char *value, int overwrite);
#endif
#ifndef HAVE_CLEARENV
void clearenv();
void clearenv(void);
#endif
#endif

View File

@ -39,12 +39,12 @@ struct fpm_event_module_s {
void fpm_event_loop(int err);
void fpm_event_fire(struct fpm_event_s *ev);
int fpm_event_init_main();
int fpm_event_init_main(void);
int fpm_event_set(struct fpm_event_s *ev, int fd, int flags, void (*callback)(struct fpm_event_s *, short, void *), void *arg);
int fpm_event_add(struct fpm_event_s *ev, unsigned long int timeout);
int fpm_event_del(struct fpm_event_s *ev);
int fpm_event_pre_init(char *mechanism);
const char *fpm_event_mechanism_name();
int fpm_event_support_edge_trigger();
const char *fpm_event_mechanism_name(void);
int fpm_event_support_edge_trigger(void);
#endif

View File

@ -38,8 +38,8 @@ char *fpm_php_request_method(void);
char *fpm_php_query_string(void);
char *fpm_php_auth_user(void);
size_t fpm_php_content_length(void);
void fpm_php_soft_quit();
int fpm_php_init_main();
void fpm_php_soft_quit(void);
int fpm_php_init_main(void);
int fpm_php_apply_defines_ex(struct key_value_s *kv, int mode);
int fpm_php_limit_extensions(char *path);
char* fpm_php_get_string_from_table(zend_string *table, char *key);

View File

@ -63,7 +63,7 @@ static int fpm_pctl_timeout_set(int sec) /* {{{ */
}
/* }}} */
static void fpm_pctl_exit() /* {{{ */
static void fpm_pctl_exit(void) /* {{{ */
{
zlog(ZLOG_NOTICE, "exiting, bye-bye!");
@ -75,7 +75,7 @@ static void fpm_pctl_exit() /* {{{ */
#define optional_arg(c) (saved_argc > c ? ", \"" : ""), (saved_argc > c ? saved_argv[c] : ""), (saved_argc > c ? "\"" : "")
static void fpm_pctl_exec() /* {{{ */
static void fpm_pctl_exec(void) /* {{{ */
{
zlog(ZLOG_DEBUG, "Blocking some signals before reexec");
if (0 > fpm_signals_block()) {
@ -106,7 +106,7 @@ static void fpm_pctl_exec() /* {{{ */
}
/* }}} */
static void fpm_pctl_action_last() /* {{{ */
static void fpm_pctl_action_last(void) /* {{{ */
{
switch (fpm_state) {
case FPM_PCTL_STATE_RELOADING:
@ -172,7 +172,7 @@ void fpm_pctl_kill_all(int signo) /* {{{ */
}
/* }}} */
static void fpm_pctl_action_next() /* {{{ */
static void fpm_pctl_action_next(void) /* {{{ */
{
int sig, timeout;

View File

@ -14,14 +14,14 @@
struct fpm_child_s;
void fpm_pctl(int new_state, int action);
int fpm_pctl_can_spawn_children();
int fpm_pctl_can_spawn_children(void);
int fpm_pctl_kill(pid_t pid, int how);
void fpm_pctl_kill_all(int signo);
void fpm_pctl_heartbeat(struct fpm_event_s *ev, short which, void *arg);
void fpm_pctl_perform_idle_server_maintenance_heartbeat(struct fpm_event_s *ev, short which, void *arg);
void fpm_pctl_on_socket_accept(struct fpm_event_s *ev, short which, void *arg);
int fpm_pctl_child_exited();
int fpm_pctl_init_main();
int fpm_pctl_child_exited(void);
int fpm_pctl_init_main(void);
enum {

View File

@ -4,17 +4,17 @@
#define FPM_REQUEST_H 1
/* hanging in accept() */
void fpm_request_accepting();
void fpm_request_accepting(void);
/* start reading fastcgi request from very first byte */
void fpm_request_reading_headers();
void fpm_request_reading_headers(void);
/* not a stage really but a point in the php code, where all request params have become known to sapi */
void fpm_request_info();
void fpm_request_info(void);
/* the script is executing */
void fpm_request_executing();
void fpm_request_executing(void);
/* request ended: script response have been sent to web server */
void fpm_request_end(void);
/* request processed: cleaning current request */
void fpm_request_finished();
void fpm_request_finished(void);
struct fpm_child_s;
struct timeval;

View File

@ -67,11 +67,11 @@ struct fpm_scoreboard_s {
struct fpm_scoreboard_proc_s *procs[];
};
int fpm_scoreboard_init_main();
int fpm_scoreboard_init_main(void);
int fpm_scoreboard_init_child(struct fpm_worker_pool_s *wp);
void fpm_scoreboard_update(int idle, int active, int lq, int lq_len, int requests, int max_children_reached, int slow_rq, int action, struct fpm_scoreboard_s *scoreboard);
struct fpm_scoreboard_s *fpm_scoreboard_get();
struct fpm_scoreboard_s *fpm_scoreboard_get(void);
struct fpm_scoreboard_proc_s *fpm_scoreboard_proc_get(struct fpm_scoreboard_s *scoreboard, int child_index);
struct fpm_scoreboard_s *fpm_scoreboard_acquire(struct fpm_scoreboard_s *scoreboard, int nohang);
@ -87,7 +87,7 @@ void fpm_scoreboard_proc_free(struct fpm_scoreboard_s *scoreboard, int child_ind
int fpm_scoreboard_proc_alloc(struct fpm_scoreboard_s *scoreboard, int *child_index);
#ifdef HAVE_TIMES
float fpm_scoreboard_get_tick();
float fpm_scoreboard_get_tick(void);
#endif
#endif

View File

@ -5,6 +5,6 @@
void *fpm_shm_alloc(size_t size);
int fpm_shm_free(void *mem, size_t size);
size_t fpm_shm_get_size_allocated();
size_t fpm_shm_get_size_allocated(void);
#endif

View File

@ -5,13 +5,13 @@
#include <signal.h>
int fpm_signals_init_main();
int fpm_signals_init_child();
int fpm_signals_get_fd();
int fpm_signals_init_mask();
int fpm_signals_block();
int fpm_signals_child_block();
int fpm_signals_unblock();
int fpm_signals_init_main(void);
int fpm_signals_init_child(void);
int fpm_signals_get_fd(void);
int fpm_signals_init_mask(void);
int fpm_signals_block(void);
int fpm_signals_child_block(void);
int fpm_signals_unblock(void);
extern const char *fpm_signal_names[NSIG + 1];

View File

@ -24,7 +24,7 @@
#define FPM_ENV_SOCKET_SET_SIZE 128
enum fpm_address_domain fpm_sockets_domain_from_address(char *addr);
int fpm_sockets_init_main();
int fpm_sockets_init_main(void);
int fpm_socket_get_listening_queue(int sock, unsigned *cur_lq, unsigned *max_lq);
int fpm_socket_unix_test_connect(struct sockaddr_un *sock, size_t socklen);

View File

@ -42,7 +42,7 @@ int fpm_stdio_init_main() /* {{{ */
}
/* }}} */
static inline int fpm_use_error_log() { /* {{{ */
static inline int fpm_use_error_log(void) { /* {{{ */
/*
* the error_log is NOT used when running in foreground
* and from a tty (user looking at output).

View File

@ -7,10 +7,10 @@
#define STREAM_SET_MSG_PREFIX_FMT "[pool %s] child %d said into %s: "
int fpm_stdio_init_main();
int fpm_stdio_init_final();
int fpm_stdio_init_main(void);
int fpm_stdio_init_final(void);
int fpm_stdio_init_child(struct fpm_worker_pool_s *wp);
int fpm_stdio_flush_child();
int fpm_stdio_flush_child(void);
int fpm_stdio_prepare_pipes(struct fpm_child_s *child);
void fpm_stdio_child_use_pipes(struct fpm_child_s *child);
int fpm_stdio_parent_use_pipes(struct fpm_child_s *child);

View File

@ -7,6 +7,6 @@
#define FPM_SYSTEMD_DEFAULT_HEARTBEAT (10000)
void fpm_systemd_heartbeat(struct fpm_event_s *ev, short which, void *arg);
int fpm_systemd_conf();
int fpm_systemd_conf(void);
#endif

View File

@ -10,7 +10,7 @@ int fpm_unix_set_socket_permissions(struct fpm_worker_pool_s *wp, const char *pa
int fpm_unix_free_socket_permissions(struct fpm_worker_pool_s *wp);
int fpm_unix_init_child(struct fpm_worker_pool_s *wp);
int fpm_unix_init_main();
int fpm_unix_init_main(void);
extern size_t fpm_pagesize;

View File

@ -47,9 +47,9 @@ struct fpm_worker_pool_s {
#endif
};
struct fpm_worker_pool_s *fpm_worker_pool_alloc();
struct fpm_worker_pool_s *fpm_worker_pool_alloc(void);
void fpm_worker_pool_free(struct fpm_worker_pool_s *wp);
int fpm_worker_pool_init_main();
int fpm_worker_pool_init_main(void);
void fpm_worker_pool_free_limit_extensions(char **limit_extensions);

View File

@ -89,7 +89,7 @@ zend_string *phpdbg_compile_stackframe(zend_execute_data *ex) {
return s.s;
}
void phpdbg_print_cur_frame_info() {
void phpdbg_print_cur_frame_info(void) {
const char *file_chr = zend_get_executed_filename();
zend_string *file = zend_string_init(file_chr, strlen(file_chr), 0);

View File

@ -264,7 +264,7 @@ PHPDBG_PRINT(func) /* {{{ */
return SUCCESS;
} /* }}} */
void phpdbg_print_opcodes_main() {
void phpdbg_print_opcodes_main(void) {
phpdbg_out("function name: (null)\n");
phpdbg_print_function_helper((zend_function *) PHPDBG_G(ops));
}

View File

@ -600,7 +600,7 @@ PHPDBG_COMMAND(continue) /* {{{ */
return PHPDBG_NEXT;
} /* }}} */
int phpdbg_skip_line_helper() /* {{{ */ {
int phpdbg_skip_line_helper(void) /* {{{ */ {
zend_execute_data *ex = phpdbg_user_execute_data(EG(current_execute_data));
const zend_op_array *op_array = &ex->func->op_array;
const zend_op *opline = op_array->opcodes;
@ -1638,7 +1638,7 @@ int phpdbg_interactive(bool allow_async_unsafe, char *input) /* {{{ */
return ret;
} /* }}} */
static inline void list_code() {
static inline void list_code(void) {
if (!(PHPDBG_G(flags) & PHPDBG_IN_EVAL)) {
const char *file_char = zend_get_executed_filename();
zend_string *file = zend_string_init(file_char, strlen(file_char), 0);

View File

@ -719,7 +719,7 @@ void phpdbg_automatic_dequeue_free(phpdbg_watch_element *element) {
phpdbg_free_watch_element_tree(element);
}
void phpdbg_dequeue_elements_for_recreation() {
void phpdbg_dequeue_elements_for_recreation(void) {
phpdbg_watch_element *element;
ZEND_HASH_FOREACH_PTR(&PHPDBG_G(watch_recreation), element) {