1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-09 11:13:12 +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
+2 -2
View File
@@ -704,7 +704,7 @@ irc_bar_item_buffer_switch (const void *pointer, void *data,
*/
void
irc_bar_item_update_channel ()
irc_bar_item_update_channel (void)
{
weechat_bar_item_update ("buffer_name");
weechat_bar_item_update ("buffer_short_name");
@@ -716,7 +716,7 @@ irc_bar_item_update_channel ()
*/
void
irc_bar_item_init ()
irc_bar_item_init (void)
{
weechat_bar_item_new ("buffer_plugin",
&irc_bar_item_buffer_plugin, NULL, NULL);
+2 -2
View File
@@ -20,7 +20,7 @@
#ifndef WEECHAT_PLUGIN_IRC_BAR_ITEM_H
#define WEECHAT_PLUGIN_IRC_BAR_ITEM_H
extern void irc_bar_item_update_channel ();
extern void irc_bar_item_init ();
extern void irc_bar_item_update_channel (void);
extern void irc_bar_item_init (void);
#endif /* WEECHAT_PLUGIN_IRC_BAR_ITEM_H */
+1 -1
View File
@@ -305,7 +305,7 @@ irc_buffer_nickcmp_cb (const void *pointer, void *data,
*/
struct t_gui_buffer *
irc_buffer_search_server_lowest_number ()
irc_buffer_search_server_lowest_number (void)
{
struct t_gui_buffer *ptr_buffer;
struct t_irc_server *ptr_server;
+1 -1
View File
@@ -52,7 +52,7 @@ extern int irc_buffer_close_cb (const void *pointer, void *data,
extern int irc_buffer_nickcmp_cb (const void *pointer, void *data,
struct t_gui_buffer *buffer,
const char *nick1, const char *nick2);
extern struct t_gui_buffer *irc_buffer_search_server_lowest_number ();
extern struct t_gui_buffer *irc_buffer_search_server_lowest_number (void);
extern struct t_gui_buffer *irc_buffer_search_private_lowest_number (struct t_irc_server *server);
extern void irc_buffer_move_near_server (struct t_irc_server *server,
int list_buffer, int channel_type,
+2 -2
View File
@@ -1080,7 +1080,7 @@ irc_color_weechat_add_to_infolist (struct t_infolist *infolist)
*/
void
irc_color_init ()
irc_color_init (void)
{
irc_color_index_string_decoded = 0;
memset (irc_color_string_decoded, 0, sizeof (irc_color_string_decoded));
@@ -1091,7 +1091,7 @@ irc_color_init ()
*/
void
irc_color_end ()
irc_color_end (void)
{
int i;
+2 -2
View File
@@ -127,7 +127,7 @@ extern char *irc_color_modifier_cb (const void *pointer, void *data,
const char *string);
extern char *irc_color_for_tags (const char *color);
extern int irc_color_weechat_add_to_infolist (struct t_infolist *infolist);
extern void irc_color_init ();
extern void irc_color_end ();
extern void irc_color_init (void);
extern void irc_color_end (void);
#endif /* WEECHAT_PLUGIN_IRC_COLOR_H */
+1 -1
View File
@@ -7036,7 +7036,7 @@ IRC_COMMAND_CALLBACK(whowas)
*/
void
irc_command_init ()
irc_command_init (void)
{
struct t_hook *ptr_hook;
+1 -1
View File
@@ -85,6 +85,6 @@ extern void irc_command_part_channel (struct t_irc_server *server,
const char *part_message);
extern void irc_command_quit_server (struct t_irc_server *server,
const char *arguments);
extern void irc_command_init ();
extern void irc_command_init (void);
#endif /* WEECHAT_PLUGIN_IRC_COMMAND_H */
+1 -1
View File
@@ -956,7 +956,7 @@ irc_completion_raw_filters_cb (const void *pointer, void *data,
*/
void
irc_completion_init ()
irc_completion_init (void)
{
weechat_hook_completion ("irc_server",
N_("current IRC server"),
+1 -1
View File
@@ -20,6 +20,6 @@
#ifndef WEECHAT_PLUGIN_IRC_COMPLETION_H
#define WEECHAT_PLUGIN_IRC_COMPLETION_H
extern void irc_completion_init ();
extern void irc_completion_init (void);
#endif /* WEECHAT_PLUGIN_IRC_COMPLETION_H */
+4 -4
View File
@@ -228,7 +228,7 @@ irc_config_get_server_from_option_name (const char *name)
*/
void
irc_config_compute_nick_colors ()
irc_config_compute_nick_colors (void)
{
struct t_irc_server *ptr_server;
struct t_irc_channel *ptr_channel;
@@ -3174,7 +3174,7 @@ irc_config_update_cb (const void *pointer, void *data,
*/
int
irc_config_init ()
irc_config_init (void)
{
int i;
@@ -4249,7 +4249,7 @@ irc_config_init ()
*/
int
irc_config_read ()
irc_config_read (void)
{
int rc;
@@ -4289,7 +4289,7 @@ irc_config_write (int write_temp_servers)
*/
void
irc_config_free ()
irc_config_free (void)
{
weechat_config_free (irc_config_file);
irc_config_file = NULL;
+3 -3
View File
@@ -244,9 +244,9 @@ struct t_config_option *irc_config_server_new_option (struct t_config_file *conf
struct t_config_option *option),
const void *callback_change_pointer,
void *callback_change_data);
extern int irc_config_init ();
extern int irc_config_read ();
extern int irc_config_init (void);
extern int irc_config_read (void);
extern int irc_config_write (int write_temp_servers);
extern void irc_config_free ();
extern void irc_config_free (void);
#endif /* WEECHAT_PLUGIN_IRC_CONFIG_H */
+1 -1
View File
@@ -68,7 +68,7 @@ irc_debug_signal_debug_dump_cb (const void *pointer, void *data,
*/
void
irc_debug_init ()
irc_debug_init (void)
{
weechat_hook_signal ("debug_dump",
&irc_debug_signal_debug_dump_cb, NULL, NULL);
+1 -1
View File
@@ -20,6 +20,6 @@
#ifndef WEECHAT_PLUGIN_IRC_DEBUG_H
#define WEECHAT_PLUGIN_IRC_DEBUG_H
extern void irc_debug_init ();
extern void irc_debug_init (void);
#endif /* WEECHAT_PLUGIN_IRC_DEBUG_H */
+2 -2
View File
@@ -339,7 +339,7 @@ irc_ignore_free (struct t_irc_ignore *ignore)
*/
void
irc_ignore_free_all ()
irc_ignore_free_all (void)
{
while (irc_ignore_list)
{
@@ -414,7 +414,7 @@ irc_ignore_add_to_infolist (struct t_infolist *infolist,
*/
void
irc_ignore_print_log ()
irc_ignore_print_log (void)
{
struct t_irc_ignore *ptr_ignore;
+2 -2
View File
@@ -59,12 +59,12 @@ extern int irc_ignore_check (struct t_irc_server *server,
const char *channel, const char *nick,
const char *host);
extern void irc_ignore_free (struct t_irc_ignore *ignore);
extern void irc_ignore_free_all ();
extern void irc_ignore_free_all (void);
extern struct t_hdata *irc_ignore_hdata_ignore_cb (const void *pointer,
void *data,
const char *hdata_name);
extern int irc_ignore_add_to_infolist (struct t_infolist *infolist,
struct t_irc_ignore *ignore);
extern void irc_ignore_print_log ();
extern void irc_ignore_print_log (void);
#endif /* WEECHAT_PLUGIN_IRC_IGNORE_H */
+1 -1
View File
@@ -1335,7 +1335,7 @@ irc_info_infolist_irc_color_weechat_cb (const void *pointer, void *data,
*/
void
irc_info_init ()
irc_info_init (void)
{
/* info hooks */
weechat_hook_info (
+1 -1
View File
@@ -20,6 +20,6 @@
#ifndef WEECHAT_PLUGIN_IRC_INFO_H
#define WEECHAT_PLUGIN_IRC_INFO_H
extern void irc_info_init ();
extern void irc_info_init (void);
#endif /* WEECHAT_PLUGIN_IRC_INFO_H */
+3 -3
View File
@@ -1167,7 +1167,7 @@ irc_list_reset (struct t_irc_server *server)
*/
struct t_irc_list *
irc_list_alloc ()
irc_list_alloc (void)
{
struct t_irc_list *list;
@@ -1348,7 +1348,7 @@ irc_list_mouse_hsignal_cb (const void *pointer, void *data, const char *signal,
*/
void
irc_list_init ()
irc_list_init (void)
{
struct t_hashtable *keys;
@@ -1409,7 +1409,7 @@ irc_list_init ()
*/
void
irc_list_end ()
irc_list_end (void)
{
if (irc_list_filter_hashtable_pointers)
{
+3 -3
View File
@@ -69,7 +69,7 @@ extern int irc_list_hsignal_redirect_list_cb (const void *pointer,
struct t_hashtable *hashtable);
extern int irc_list_export (struct t_irc_server *server, const char *filename);
extern void irc_list_reset (struct t_irc_server *server);
extern struct t_irc_list *irc_list_alloc ();
extern struct t_irc_list *irc_list_alloc (void);
extern void irc_list_free_data (struct t_irc_server *server);
extern void irc_list_free (struct t_irc_server *server);
extern struct t_hdata *irc_list_hdata_list_channel_cb (const void *pointer,
@@ -77,7 +77,7 @@ extern struct t_hdata *irc_list_hdata_list_channel_cb (const void *pointer,
const char *hdata_name);
extern struct t_hdata *irc_list_hdata_list_cb (const void *pointer, void *data,
const char *hdata_name);
extern void irc_list_init ();
extern void irc_list_end ();
extern void irc_list_init (void);
extern void irc_list_end (void);
#endif /* WEECHAT_PLUGIN_IRC_LIST_H */
+2 -2
View File
@@ -465,7 +465,7 @@ irc_nick_nicklist_set (struct t_irc_channel *channel,
*/
void
irc_nick_nicklist_set_prefix_color_all ()
irc_nick_nicklist_set_prefix_color_all (void)
{
struct t_irc_server *ptr_server;
struct t_irc_channel *ptr_channel;
@@ -493,7 +493,7 @@ irc_nick_nicklist_set_prefix_color_all ()
*/
void
irc_nick_nicklist_set_color_all ()
irc_nick_nicklist_set_color_all (void)
{
struct t_irc_server *ptr_server;
struct t_irc_channel *ptr_channel;
+2 -2
View File
@@ -59,8 +59,8 @@ extern int irc_nick_has_prefix_mode (struct t_irc_server *server,
char prefix_mode);
extern const char *irc_nick_get_prefix_color_name (struct t_irc_server *server,
char prefix);
extern void irc_nick_nicklist_set_prefix_color_all ();
extern void irc_nick_nicklist_set_color_all ();
extern void irc_nick_nicklist_set_prefix_color_all (void);
extern void irc_nick_nicklist_set_color_all (void);
extern struct t_irc_nick *irc_nick_new_in_channel (struct t_irc_server *server,
struct t_irc_channel *channel,
const char *nickname,
+5 -5
View File
@@ -409,7 +409,7 @@ irc_notify_new_for_server (struct t_irc_server *server)
*/
void
irc_notify_new_for_all_servers ()
irc_notify_new_for_all_servers (void)
{
struct t_irc_server *ptr_server;
@@ -1231,7 +1231,7 @@ irc_notify_print_log (struct t_irc_server *server)
*/
void
irc_notify_hook_timer_ison ()
irc_notify_hook_timer_ison (void)
{
weechat_unhook (irc_notify_timer_ison);
irc_notify_timer_ison = weechat_hook_timer (
@@ -1244,7 +1244,7 @@ irc_notify_hook_timer_ison ()
*/
void
irc_notify_hook_timer_whois ()
irc_notify_hook_timer_whois (void)
{
weechat_unhook (irc_notify_timer_whois);
irc_notify_timer_whois = weechat_hook_timer (
@@ -1257,7 +1257,7 @@ irc_notify_hook_timer_whois ()
*/
void
irc_notify_init ()
irc_notify_init (void)
{
irc_notify_hook_timer_ison ();
irc_notify_hook_timer_whois ();
@@ -1272,7 +1272,7 @@ irc_notify_init ()
*/
void
irc_notify_end ()
irc_notify_end (void)
{
if (irc_notify_timer_ison)
{
+5 -5
View File
@@ -52,7 +52,7 @@ extern struct t_irc_notify *irc_notify_new (struct t_irc_server *server,
int check_away);
extern void irc_notify_check_now (struct t_irc_notify *notify);
extern void irc_notify_new_for_server (struct t_irc_server *server);
extern void irc_notify_new_for_all_servers ();
extern void irc_notify_new_for_all_servers (void);
extern void irc_notify_free (struct t_irc_server *server,
struct t_irc_notify *notify, int remove_monitor);
extern void irc_notify_display_is_on (struct t_irc_server *server,
@@ -75,9 +75,9 @@ extern struct t_hdata *irc_notify_hdata_notify_cb (const void *pointer,
extern int irc_notify_add_to_infolist (struct t_infolist *infolist,
struct t_irc_notify *notify);
extern void irc_notify_print_log (struct t_irc_server *server);
extern void irc_notify_hook_timer_ison ();
extern void irc_notify_hook_timer_whois ();
extern void irc_notify_init ();
extern void irc_notify_end ();
extern void irc_notify_hook_timer_ison (void);
extern void irc_notify_hook_timer_whois (void);
extern void irc_notify_init (void);
extern void irc_notify_end (void);
#endif /* WEECHAT_PLUGIN_IRC_NOTIFY_H */
+6 -6
View File
@@ -315,7 +315,7 @@ irc_raw_message_print (struct t_irc_raw_message *raw_message)
*/
void
irc_raw_set_localvar_filter ()
irc_raw_set_localvar_filter (void)
{
if (!irc_raw_buffer)
return;
@@ -329,7 +329,7 @@ irc_raw_set_localvar_filter ()
*/
void
irc_raw_set_title ()
irc_raw_set_title (void)
{
char str_title[1024];
@@ -490,7 +490,7 @@ irc_raw_message_free (struct t_irc_raw_message *raw_message)
*/
void
irc_raw_message_free_all ()
irc_raw_message_free_all (void)
{
while (irc_raw_messages)
{
@@ -503,7 +503,7 @@ irc_raw_message_free_all ()
*/
void
irc_raw_message_remove_old ()
irc_raw_message_remove_old (void)
{
int max_messages;
@@ -643,7 +643,7 @@ irc_raw_add_to_infolist (struct t_infolist *infolist,
*/
void
irc_raw_init ()
irc_raw_init (void)
{
irc_raw_filter_hashtable_options = weechat_hashtable_new (
8,
@@ -662,7 +662,7 @@ irc_raw_init ()
*/
void
irc_raw_end ()
irc_raw_end (void)
{
irc_raw_message_free_all ();
+2 -2
View File
@@ -68,7 +68,7 @@ extern void irc_raw_print (struct t_irc_server *server, int flags,
const char *message);
extern int irc_raw_add_to_infolist (struct t_infolist *infolist,
struct t_irc_raw_message *raw_message);
extern void irc_raw_init ();
extern void irc_raw_end ();
extern void irc_raw_init (void);
extern void irc_raw_end (void);
#endif /* WEECHAT_PLUGIN_IRC_RAW_H */
+4 -4
View File
@@ -377,7 +377,7 @@ irc_redirect_pattern_free (struct t_irc_redirect_pattern *redirect_pattern)
*/
void
irc_redirect_pattern_free_all ()
irc_redirect_pattern_free_all (void)
{
while (irc_redirect_patterns)
{
@@ -1177,7 +1177,7 @@ irc_redirect_add_to_infolist (struct t_infolist *infolist,
*/
void
irc_redirect_pattern_print_log ()
irc_redirect_pattern_print_log (void)
{
struct t_irc_redirect_pattern *ptr_redirect_pattern;
@@ -1391,7 +1391,7 @@ irc_redirect_command_hsignal_cb (const void *pointer, void *data,
*/
void
irc_redirect_init ()
irc_redirect_init (void)
{
int i;
@@ -1411,7 +1411,7 @@ irc_redirect_init ()
*/
void
irc_redirect_end ()
irc_redirect_end (void)
{
irc_redirect_pattern_free_all ();
}
+3 -3
View File
@@ -121,7 +121,7 @@ extern int irc_redirect_pattern_add_to_infolist (struct t_infolist *infolist,
struct t_irc_redirect_pattern *redirect_pattern);
extern int irc_redirect_add_to_infolist (struct t_infolist *infolist,
struct t_irc_redirect *redirect);
extern void irc_redirect_pattern_print_log ();
extern void irc_redirect_pattern_print_log (void);
extern void irc_redirect_print_log (struct t_irc_server *server);
extern int irc_redirect_pattern_hsignal_cb (const void *pointer, void *data,
const char *signal,
@@ -129,7 +129,7 @@ extern int irc_redirect_pattern_hsignal_cb (const void *pointer, void *data,
extern int irc_redirect_command_hsignal_cb (const void *pointer, void *data,
const char *signal,
struct t_hashtable *hashtable);
extern void irc_redirect_init ();
extern void irc_redirect_end ();
extern void irc_redirect_init (void);
extern void irc_redirect_end (void);
#endif /* WEECHAT_PLUGIN_IRC_REDIRECT_H */
+5 -5
View File
@@ -2422,7 +2422,7 @@ irc_server_free (struct t_irc_server *server)
*/
void
irc_server_free_all ()
irc_server_free_all (void)
{
/* for each server in memory, remove it */
while (irc_servers)
@@ -3480,7 +3480,7 @@ irc_server_msgq_add_buffer (struct t_irc_server *server, const char *buffer)
*/
void
irc_server_msgq_flush ()
irc_server_msgq_flush (void)
{
struct t_irc_message *next;
char *ptr_data, *new_msg, *new_msg2, *ptr_msg, *ptr_msg2, *pos;
@@ -4849,7 +4849,7 @@ irc_server_create_buffer (struct t_irc_server *server)
*/
char *
irc_server_fingerprint_str_sizes ()
irc_server_fingerprint_str_sizes (void)
{
char str_sizes[1024], str_one_size[128];
int i;
@@ -5819,7 +5819,7 @@ irc_server_disconnect (struct t_irc_server *server, int switch_address,
*/
void
irc_server_disconnect_all ()
irc_server_disconnect_all (void)
{
struct t_irc_server *ptr_server;
@@ -6948,7 +6948,7 @@ irc_server_add_to_infolist (struct t_infolist *infolist,
*/
void
irc_server_print_log ()
irc_server_print_log (void)
{
struct t_irc_server *ptr_server;
struct t_irc_channel *ptr_channel;
+5 -5
View File
@@ -400,7 +400,7 @@ extern struct t_irc_server *irc_server_alloc (const char *name);
extern struct t_irc_server *irc_server_alloc_with_url (const char *irc_url);
extern void irc_server_apply_command_line_options (struct t_irc_server *server,
int argc, char **argv);
extern void irc_server_free_all ();
extern void irc_server_free_all (void);
extern struct t_irc_server *irc_server_copy (struct t_irc_server *server,
const char *new_name);
extern int irc_server_rename (struct t_irc_server *server, const char *new_name);
@@ -418,10 +418,10 @@ extern struct t_arraylist *irc_server_sendf (struct t_irc_server *server,
const char *format, ...);
extern void irc_server_msgq_add_buffer (struct t_irc_server *server,
const char *buffer);
extern void irc_server_msgq_flush ();
extern void irc_server_msgq_flush (void);
extern void irc_server_set_buffer_title (struct t_irc_server *server);
extern struct t_gui_buffer *irc_server_create_buffer (struct t_irc_server *server);
char *irc_server_fingerprint_str_sizes ();
char *irc_server_fingerprint_str_sizes (void);
extern int irc_server_connect (struct t_irc_server *server);
extern void irc_server_auto_connect (int auto_connect);
extern void irc_server_autojoin_channels (struct t_irc_server *server);
@@ -442,7 +442,7 @@ extern void irc_server_switch_address (struct t_irc_server *server,
int connection);
extern void irc_server_disconnect (struct t_irc_server *server,
int switch_address, int reconnect);
extern void irc_server_disconnect_all ();
extern void irc_server_disconnect_all (void);
extern void irc_server_execute_command (struct t_irc_server *server);
extern void irc_server_free_sasl_data (struct t_irc_server *server);
extern void irc_server_free (struct t_irc_server *server);
@@ -465,6 +465,6 @@ extern struct t_hdata *irc_server_hdata_server_cb (const void *pointer,
extern int irc_server_add_to_infolist (struct t_infolist *infolist,
struct t_irc_server *server,
int force_disconnected_state);
extern void irc_server_print_log ();
extern void irc_server_print_log (void);
#endif /* WEECHAT_PLUGIN_IRC_SERVER_H */
+3 -3
View File
@@ -293,7 +293,7 @@ irc_upgrade_save (int force_disconnected_state)
*/
void
irc_upgrade_set_buffer_callbacks ()
irc_upgrade_set_buffer_callbacks (void)
{
struct t_infolist *infolist;
struct t_gui_buffer *ptr_buffer;
@@ -990,7 +990,7 @@ irc_upgrade_read_cb (const void *pointer, void *data,
*/
void
irc_upgrade_set_buffer_properties ()
irc_upgrade_set_buffer_properties (void)
{
struct t_irc_server *ptr_server;
struct t_irc_channel *ptr_channel;
@@ -1021,7 +1021,7 @@ irc_upgrade_set_buffer_properties ()
*/
int
irc_upgrade_load ()
irc_upgrade_load (void)
{
int rc;
struct t_upgrade_file *upgrade_file;
+1 -1
View File
@@ -40,6 +40,6 @@ enum t_irc_upgrade_type
extern int irc_upgrading;
extern int irc_upgrade_save (int force_disconnected_state);
extern int irc_upgrade_load ();
extern int irc_upgrade_load (void);
#endif /* WEECHAT_PLUGIN_IRC_UPGRADE_H */