1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-07 18:23:13 +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:
Aaron Jones
2025-03-09 14:41:48 +00:00
committed by Sébastien Helleu
parent 20b2bdedc2
commit f5038bccbc
320 changed files with 909 additions and 909 deletions
+1 -1
View File
@@ -350,7 +350,7 @@ alias_command_cb (const void *pointer, void *data,
*/
void
alias_command_init ()
alias_command_init (void)
{
struct t_hook *ptr_hook;
+1 -1
View File
@@ -22,6 +22,6 @@
#define ALIAS_COMMAND_KEEP_SPACES weechat_hook_set (ptr_hook, "keep_spaces_right", "1")
extern void alias_command_init ();
extern void alias_command_init (void);
#endif /* WEECHAT_PLUGIN_ALIAS_COMMAND_H */
+1 -1
View File
@@ -115,7 +115,7 @@ alias_completion_alias_value_cb (const void *pointer, void *data,
*/
void
alias_completion_init ()
alias_completion_init (void)
{
weechat_hook_completion ("alias", N_("list of aliases"),
&alias_completion_alias_cb, NULL, NULL);
+1 -1
View File
@@ -20,6 +20,6 @@
#ifndef WEECHAT_PLUGIN_ALIAS_COMPLETION_H
#define WEECHAT_PLUGIN_ALIAS_COMPLETION_H
extern void alias_completion_init ();
extern void alias_completion_init (void);
#endif /* WEECHAT_PLUGIN_ALIAS_COMPLETION_H */
+3 -3
View File
@@ -427,7 +427,7 @@ alias_config_update_cb (const void *pointer, void *data,
*/
int
alias_config_init ()
alias_config_init (void)
{
alias_config_file = weechat_config_new (ALIAS_CONFIG_PRIO_NAME,
&alias_config_reload, NULL, NULL);
@@ -470,7 +470,7 @@ alias_config_init ()
*/
int
alias_config_read ()
alias_config_read (void)
{
return weechat_config_read (alias_config_file);
}
@@ -480,7 +480,7 @@ alias_config_read ()
*/
int
alias_config_write ()
alias_config_write (void)
{
return weechat_config_write (alias_config_file);
}
+3 -3
View File
@@ -35,8 +35,8 @@ extern void alias_config_cmd_new_option (const char *name,
const char *command);
extern void alias_config_completion_new_option (const char *name,
const char *completion);
extern int alias_config_init ();
extern int alias_config_read ();
extern int alias_config_write ();
extern int alias_config_init (void);
extern int alias_config_read (void);
extern int alias_config_write (void);
#endif /* WEECHAT_PLUGIN_ALIAS_CONFIG_H */
+1 -1
View File
@@ -139,7 +139,7 @@ alias_info_infolist_alias_default_cb (const void *pointer, void *data,
*/
void
alias_info_init ()
alias_info_init (void)
{
weechat_hook_infolist (
"alias", N_("list of aliases"),
+1 -1
View File
@@ -20,6 +20,6 @@
#ifndef WEECHAT_PLUGIN_ALIAS_INFO_H
#define WEECHAT_PLUGIN_ALIAS_INFO_H
extern void alias_info_init ();
extern void alias_info_init (void);
#endif /* WEECHAT_PLUGIN_ALIAS_INFO_H */
+1 -1
View File
@@ -606,7 +606,7 @@ alias_free (struct t_alias *alias)
*/
void
alias_free_all ()
alias_free_all (void)
{
while (alias_list)
{
+1 -1
View File
@@ -48,7 +48,7 @@ extern struct t_alias *alias_new (const char *name, const char *command,
const char *completion);
extern int alias_rename (struct t_alias *alias, const char *new_name);
extern void alias_free (struct t_alias *alias);
extern void alias_free_all ();
extern void alias_free_all (void);
extern int alias_add_to_infolist (struct t_infolist *infolist,
struct t_alias *alias);