mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 08:13:14 +02:00
Fix function prototypes for list of arguments
At the moment, building WeeChat triggers several thousand -Wstrict-prototypes diagnostics. This is due to its source code using an empty argument list for functions and function pointers that take no arguments, instead of explicitly declaring that they take no arguments by using a void list. This commit replaces all empty argument lists with a void list. Note that Ruby's headers also suffer the same problem, which WeeChat can't do anything to fix. Thus, building WeeChat with the Ruby plugin enabled will still issue approximately 30 such diagnostics.
This commit is contained in:
committed by
Sébastien Helleu
parent
20b2bdedc2
commit
f5038bccbc
@@ -111,7 +111,7 @@ exec_buffer_close_cb (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
void
|
||||
exec_buffer_set_callbacks ()
|
||||
exec_buffer_set_callbacks (void)
|
||||
{
|
||||
struct t_infolist *ptr_infolist;
|
||||
struct t_gui_buffer *ptr_buffer;
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifndef WEECHAT_PLUGIN_EXEC_BUFFER_H
|
||||
#define WEECHAT_PLUGIN_EXEC_BUFFER_H
|
||||
|
||||
extern void exec_buffer_set_callbacks ();
|
||||
extern void exec_buffer_set_callbacks (void);
|
||||
extern struct t_gui_buffer *exec_buffer_new (const char *name,
|
||||
int free_content,
|
||||
int clear_buffer,
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
void
|
||||
exec_command_list ()
|
||||
exec_command_list (void)
|
||||
{
|
||||
struct t_exec_cmd *ptr_exec_cmd;
|
||||
char str_elapsed[32], str_time1[256], str_time2[256];
|
||||
@@ -815,7 +815,7 @@ exec_command_exec (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
void
|
||||
exec_command_init ()
|
||||
exec_command_init (void)
|
||||
{
|
||||
weechat_hook_command (
|
||||
"exec",
|
||||
|
||||
@@ -47,6 +47,6 @@ struct t_exec_cmd_options
|
||||
extern int exec_command_run (struct t_gui_buffer *buffer,
|
||||
int argc, char **argv, char **argv_eol,
|
||||
int start_arg);
|
||||
extern void exec_command_init ();
|
||||
extern void exec_command_init (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_EXEC_COMMAND_H */
|
||||
|
||||
@@ -68,7 +68,7 @@ exec_completion_commands_ids_cb (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
void
|
||||
exec_completion_init ()
|
||||
exec_completion_init (void)
|
||||
{
|
||||
weechat_hook_completion ("exec_commands_ids",
|
||||
N_("ids (numbers and names) of executed commands"),
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
#ifndef WEECHAT_PLUGIN_EXEC_COMPLETION_H
|
||||
#define WEECHAT_PLUGIN_EXEC_COMPLETION_H
|
||||
|
||||
extern void exec_completion_init ();
|
||||
extern void exec_completion_init (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_EXEC_COMPLETION_H */
|
||||
|
||||
@@ -99,7 +99,7 @@ exec_config_reload_cb (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
int
|
||||
exec_config_init ()
|
||||
exec_config_init (void)
|
||||
{
|
||||
exec_config_file = weechat_config_new (EXEC_CONFIG_PRIO_NAME,
|
||||
&exec_config_reload_cb, NULL, NULL);
|
||||
@@ -181,7 +181,7 @@ exec_config_init ()
|
||||
*/
|
||||
|
||||
int
|
||||
exec_config_read ()
|
||||
exec_config_read (void)
|
||||
{
|
||||
return weechat_config_read (exec_config_file);
|
||||
}
|
||||
@@ -191,7 +191,7 @@ exec_config_read ()
|
||||
*/
|
||||
|
||||
int
|
||||
exec_config_write ()
|
||||
exec_config_write (void)
|
||||
{
|
||||
return weechat_config_write (exec_config_file);
|
||||
}
|
||||
@@ -201,7 +201,7 @@ exec_config_write ()
|
||||
*/
|
||||
|
||||
void
|
||||
exec_config_free ()
|
||||
exec_config_free (void)
|
||||
{
|
||||
weechat_config_free (exec_config_file);
|
||||
exec_config_file = NULL;
|
||||
|
||||
@@ -35,9 +35,9 @@ extern struct t_config_option *exec_config_color_flag_running;
|
||||
extern char **exec_config_cmd_options;
|
||||
extern int exec_config_cmd_num_options;
|
||||
|
||||
extern int exec_config_init ();
|
||||
extern int exec_config_read ();
|
||||
extern int exec_config_write ();
|
||||
extern void exec_config_free ();
|
||||
extern int exec_config_init (void);
|
||||
extern int exec_config_read (void);
|
||||
extern int exec_config_write (void);
|
||||
extern void exec_config_free (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_EXEC_CONFIG_H */
|
||||
|
||||
@@ -115,7 +115,7 @@ exec_search_by_id (const char *id)
|
||||
*/
|
||||
|
||||
struct t_exec_cmd *
|
||||
exec_add ()
|
||||
exec_add (void)
|
||||
{
|
||||
struct t_exec_cmd *new_exec_cmd;
|
||||
int i;
|
||||
@@ -642,7 +642,7 @@ exec_free (struct t_exec_cmd *exec_cmd)
|
||||
*/
|
||||
|
||||
void
|
||||
exec_free_all ()
|
||||
exec_free_all (void)
|
||||
{
|
||||
while (exec_cmds)
|
||||
{
|
||||
@@ -655,7 +655,7 @@ exec_free_all ()
|
||||
*/
|
||||
|
||||
void
|
||||
exec_print_log ()
|
||||
exec_print_log (void)
|
||||
{
|
||||
struct t_exec_cmd *ptr_exec_cmd;
|
||||
|
||||
|
||||
@@ -83,11 +83,11 @@ extern int exec_cmds_count;
|
||||
|
||||
extern int exec_search_color (const char *color);
|
||||
extern struct t_exec_cmd *exec_search_by_id (const char *id);
|
||||
extern struct t_exec_cmd *exec_add ();
|
||||
extern struct t_exec_cmd *exec_add (void);
|
||||
extern int exec_process_cb (const void *pointer, void *data,
|
||||
const char *command, int return_code,
|
||||
const char *out, const char *err);
|
||||
extern void exec_free (struct t_exec_cmd *exec_cmd);
|
||||
extern void exec_free_all ();
|
||||
extern void exec_free_all (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_EXEC_H */
|
||||
|
||||
Reference in New Issue
Block a user