Use "void" for empty argument list in declarations

In C, an empty argument list in a declaration means that the function
can accept any arguments. Use "void" instead, it means "no arguments".

C++ treats void and empty list as "no arguments".
master
Pavel Roskin 8 years ago
parent 15a24ff1c4
commit 6664aac00f

@ -140,7 +140,7 @@ typedef signed long long tsi64;
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
tintptr mod_init(); tintptr mod_init(void);
int mod_exit(tintptr); int mod_exit(tintptr);
#ifdef __cplusplus #ifdef __cplusplus
} }

@ -42,7 +42,7 @@
#if OPENSSL_VERSION_NUMBER < 0x10100000L #if OPENSSL_VERSION_NUMBER < 0x10100000L
static inline HMAC_CTX * static inline HMAC_CTX *
HMAC_CTX_new() HMAC_CTX_new(void)
{ {
HMAC_CTX *hmac_ctx = g_new(HMAC_CTX, 1); HMAC_CTX *hmac_ctx = g_new(HMAC_CTX, 1);
HMAC_CTX_init(hmac_ctx); HMAC_CTX_init(hmac_ctx);

@ -1637,7 +1637,7 @@ main(int argc, char **argv)
* @return unused slot index on success, -1 on failure * @return unused slot index on success, -1 on failure
******************************************************************************/ ******************************************************************************/
int APP_CC int APP_CC
find_empty_slot_in_dvc_channels() find_empty_slot_in_dvc_channels(void)
{ {
int i; int i;

@ -61,7 +61,7 @@ int APP_CC send_channel_data(int chan_id, char *data, int size);
int APP_CC send_rail_drawing_orders(char* data, int size); int APP_CC send_rail_drawing_orders(char* data, int size);
int APP_CC main_cleanup(void); int APP_CC main_cleanup(void);
int APP_CC add_timeout(int msoffset, void (*callback)(void* data), void* data); int APP_CC add_timeout(int msoffset, void (*callback)(void* data), void* data);
int APP_CC find_empty_slot_in_dvc_channels(); int APP_CC find_empty_slot_in_dvc_channels(void);
struct xrdp_api_data * APP_CC struct_from_dvc_chan_id(tui32 dvc_chan_id); struct xrdp_api_data * APP_CC struct_from_dvc_chan_id(tui32 dvc_chan_id);
int remove_struct_with_chan_id(tui32 dvc_chan_id); int remove_struct_with_chan_id(tui32 dvc_chan_id);

@ -848,7 +848,7 @@ static int xfuse_init_lib(struct fuse_args *args)
* *
*****************************************************************************/ *****************************************************************************/
static int xfuse_init_xrdp_fs() static int xfuse_init_xrdp_fs(void)
{ {
struct xrdp_inode *xino; struct xrdp_inode *xino;
@ -949,7 +949,7 @@ static int xfuse_init_xrdp_fs()
* @return 0 on success, -1 on failure * @return 0 on success, -1 on failure
*****************************************************************************/ *****************************************************************************/
static int xfuse_deinit_xrdp_fs() static int xfuse_deinit_xrdp_fs(void)
{ {
return 0; return 0;
} }
@ -1043,7 +1043,7 @@ static void xfuse_create_file(fuse_req_t req, fuse_ino_t parent,
} }
#endif #endif
static void xfuse_dump_fs() static void xfuse_dump_fs(void)
{ {
fuse_ino_t i; fuse_ino_t i;
struct xrdp_inode *xinode; struct xrdp_inode *xinode;
@ -1387,7 +1387,7 @@ static int xfuse_recursive_delete_dir_with_xinode(XRDP_INODE *xinode)
return 0; return 0;
} }
static void xfuse_update_xrdpfs_size() static void xfuse_update_xrdpfs_size(void)
{ {
void *vp; void *vp;
int diff; int diff;

@ -45,8 +45,8 @@ struct xrdp_inode
}; };
typedef struct xrdp_inode XRDP_INODE; // LK_TODO use this instead of using struct xrdp_inode typedef struct xrdp_inode XRDP_INODE; // LK_TODO use this instead of using struct xrdp_inode
int xfuse_init(); int xfuse_init(void);
int xfuse_deinit(); int xfuse_deinit(void);
int xfuse_check_wait_objs(void); int xfuse_check_wait_objs(void);
int xfuse_get_wait_objs(tbus *objs, int *count, int *timeout); int xfuse_get_wait_objs(tbus *objs, int *count, int *timeout);
int xfuse_create_share(tui32 share_id, char *dirname); int xfuse_create_share(tui32 share_id, char *dirname);

@ -40,9 +40,9 @@ int APP_CC dev_redir_data_in(struct stream* s, int chan_id, int chan_flags,
int APP_CC dev_redir_get_wait_objs(tbus* objs, int* count, int* timeout); int APP_CC dev_redir_get_wait_objs(tbus* objs, int* count, int* timeout);
int APP_CC dev_redir_check_wait_objs(void); int APP_CC dev_redir_check_wait_objs(void);
void dev_redir_send_server_core_cap_req(); void dev_redir_send_server_core_cap_req(void);
void dev_redir_send_server_clientID_confirm(); void dev_redir_send_server_clientID_confirm(void);
void dev_redir_send_server_user_logged_on(); void dev_redir_send_server_user_logged_on(void);
void devredir_send_server_device_announce_resp(tui32 device_id); void devredir_send_server_device_announce_resp(tui32 device_id);
void dev_redir_send_drive_dir_request(IRP *irp, tui32 device_id, void dev_redir_send_drive_dir_request(IRP *irp, tui32 device_id,

@ -69,7 +69,7 @@ IRP *g_irp_head = NULL;
* @return new IRP or NULL on error * @return new IRP or NULL on error
*****************************************************************************/ *****************************************************************************/
IRP * devredir_irp_new() IRP * devredir_irp_new(void)
{ {
IRP *irp; IRP *irp;
IRP *irp_last; IRP *irp_last;
@ -239,7 +239,7 @@ IRP * devredir_irp_find_by_fileid(tui32 FileId)
* Return last IRP in linked list * Return last IRP in linked list
*****************************************************************************/ *****************************************************************************/
IRP * devredir_irp_get_last() IRP * devredir_irp_get_last(void)
{ {
IRP *irp = g_irp_head; IRP *irp = g_irp_head;
@ -255,7 +255,7 @@ IRP * devredir_irp_get_last()
return irp; return irp;
} }
void devredir_irp_dump() void devredir_irp_dump(void)
{ {
IRP *irp = g_irp_head; IRP *irp = g_irp_head;

@ -356,7 +356,7 @@ rail_deinit(void)
} }
int APP_CC int APP_CC
rail_startup() rail_startup(void)
{ {
int dummy; int dummy;
int ver_maj; int ver_maj;

@ -212,8 +212,8 @@ static int APP_CC sound_input_start_recording(void);
static int APP_CC sound_input_stop_recording(void); static int APP_CC sound_input_stop_recording(void);
static int APP_CC sound_process_input_data(struct stream *s, int bytes); static int APP_CC sound_process_input_data(struct stream *s, int bytes);
static int DEFAULT_CC sound_sndsrvr_source_data_in(struct trans *trans); static int DEFAULT_CC sound_sndsrvr_source_data_in(struct trans *trans);
static int APP_CC sound_start_source_listener(); static int APP_CC sound_start_source_listener(void);
static int APP_CC sound_start_sink_listener(); static int APP_CC sound_start_sink_listener(void);
/*****************************************************************************/ /*****************************************************************************/
static int APP_CC static int APP_CC
@ -1513,7 +1513,7 @@ sound_sndsrvr_source_data_in(struct trans *trans)
* Start a listener for microphone redirection connections * Start a listener for microphone redirection connections
*****************************************************************************/ *****************************************************************************/
static int APP_CC static int APP_CC
sound_start_source_listener() sound_start_source_listener(void)
{ {
char port[1024]; char port[1024];
@ -1530,7 +1530,7 @@ sound_start_source_listener()
* Start a listener for speaker redirection connections * Start a listener for speaker redirection connections
*****************************************************************************/ *****************************************************************************/
static int APP_CC static int APP_CC
sound_start_sink_listener() sound_start_sink_listener(void)
{ {
char port[1024]; char port[1024];

@ -30,7 +30,7 @@
/* server API */ /* server API */
int DEFAULT_CC int DEFAULT_CC
scp_init() scp_init(void)
{ {
/* /*
if (0 == log) if (0 == log)

@ -41,6 +41,6 @@
* *
*/ */
int DEFAULT_CC int DEFAULT_CC
scp_init(); scp_init(void);
#endif #endif

@ -34,7 +34,7 @@
/*******************************************************************/ /*******************************************************************/
struct SCP_SESSION * struct SCP_SESSION *
scp_session_create() scp_session_create(void)
{ {
struct SCP_SESSION *s; struct SCP_SESSION *s;

@ -38,7 +38,7 @@
* *
*/ */
struct SCP_SESSION* struct SCP_SESSION*
scp_session_create(); scp_session_create(void);
int int
scp_session_set_type(struct SCP_SESSION* s, tui8 type); scp_session_set_type(struct SCP_SESSION* s, tui8 type);

@ -997,7 +997,7 @@ session_kill(int pid)
/******************************************************************************/ /******************************************************************************/
void DEFAULT_CC void DEFAULT_CC
session_sigkill_all() session_sigkill_all(void)
{ {
struct session_chain *tmp; struct session_chain *tmp;

@ -127,7 +127,7 @@ session_kill(int pid);
* *
*/ */
void DEFAULT_CC void DEFAULT_CC
session_sigkill_all(); session_sigkill_all(void);
/** /**
* *

@ -37,7 +37,7 @@ struct log_config logging;
void cmndList(struct SCP_CONNECTION *c); void cmndList(struct SCP_CONNECTION *c);
void cmndKill(struct SCP_CONNECTION *c, struct SCP_SESSION *s); void cmndKill(struct SCP_CONNECTION *c, struct SCP_SESSION *s);
void cmndHelp(); void cmndHelp(void);
int inputSession(struct SCP_SESSION *s); int inputSession(struct SCP_SESSION *s);
unsigned int menuSelect(unsigned int choices); unsigned int menuSelect(unsigned int choices);
@ -173,7 +173,7 @@ int main(int argc, char **argv)
return 0; return 0;
} }
void cmndHelp() void cmndHelp(void)
{ {
fprintf(stderr, "sesadmin - a console sesman administration tool\n"); fprintf(stderr, "sesadmin - a console sesman administration tool\n");
fprintf(stderr, "syntax: sesadmin [] COMMAND [OPTIONS]\n\n"); fprintf(stderr, "syntax: sesadmin [] COMMAND [OPTIONS]\n\n");

@ -823,7 +823,7 @@ int drawBMP(char *filename, int scroll_type)
return 0; return 0;
} }
int process_bmp_event() int process_bmp_event(void)
{ {
XEvent ev; XEvent ev;
long event_mask; long event_mask;

@ -37,8 +37,8 @@
#include <errno.h> #include <errno.h>
/* forward declarations */ /* forward declarations */
int run_echo_test(); int run_echo_test(void);
int run_tsmf_test(); int run_tsmf_test(void);
int int
main(int argc, char **argv) main(int argc, char **argv)
@ -76,7 +76,7 @@ main(int argc, char **argv)
* @return 0 on success, -1 on failure * @return 0 on success, -1 on failure
*/ */
int int
run_echo_test() run_echo_test(void)
{ {
char out_buf[8192]; char out_buf[8192];
char in_buf[1700]; char in_buf[1700];
@ -162,7 +162,7 @@ run_echo_test()
} }
int int
run_tsmf_test() run_tsmf_test(void)
{ {
void *channel; void *channel;

Loading…
Cancel
Save