1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-08 02:33: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
+3 -3
View File
@@ -39,7 +39,7 @@ struct t_gui_bar_item *fset_bar_item_fset = NULL;
*/
void
fset_bar_item_update ()
fset_bar_item_update (void)
{
weechat_bar_item_update (FSET_BAR_ITEM_NAME);
}
@@ -231,7 +231,7 @@ fset_bar_item_fset_cb (const void *pointer, void *data,
*/
int
fset_bar_item_init ()
fset_bar_item_init (void)
{
fset_bar_item_fset = weechat_bar_item_new (
FSET_BAR_ITEM_NAME,
@@ -245,7 +245,7 @@ fset_bar_item_init ()
*/
void
fset_bar_item_end ()
fset_bar_item_end (void)
{
weechat_bar_item_remove (fset_bar_item_fset);
fset_bar_item_fset = NULL;
+3 -3
View File
@@ -22,8 +22,8 @@
#define FSET_BAR_ITEM_NAME "fset"
extern void fset_bar_item_update ();
extern int fset_bar_item_init ();
extern void fset_bar_item_end ();
extern void fset_bar_item_update (void);
extern int fset_bar_item_init (void);
extern void fset_bar_item_end (void);
#endif /* WEECHAT_PLUGIN_FSET_BAR_ITEM_H */
+7 -7
View File
@@ -42,7 +42,7 @@ struct t_hashtable *fset_buffer_hashtable_extra_vars = NULL;
*/
void
fset_buffer_set_title ()
fset_buffer_set_title (void)
{
int num_options;
char str_marked[32], str_title[8192];
@@ -1237,7 +1237,7 @@ fset_buffer_get_window_info (struct t_gui_window *window,
*/
void
fset_buffer_check_line_outside_window ()
fset_buffer_check_line_outside_window (void)
{
struct t_gui_window *window;
int start_line_y, chat_height, format_number, lines_per_option;
@@ -1477,7 +1477,7 @@ fset_buffer_close_cb (const void *pointer, void *data,
*/
void
fset_buffer_set_callbacks ()
fset_buffer_set_callbacks (void)
{
struct t_gui_buffer *ptr_buffer;
@@ -1553,7 +1553,7 @@ fset_buffer_set_keys (struct t_hashtable *hashtable)
*/
void
fset_buffer_set_localvar_filter ()
fset_buffer_set_localvar_filter (void)
{
if (!fset_buffer)
return;
@@ -1567,7 +1567,7 @@ fset_buffer_set_localvar_filter ()
*/
void
fset_buffer_open ()
fset_buffer_open (void)
{
struct t_hashtable *buffer_props;
@@ -1612,7 +1612,7 @@ fset_buffer_open ()
*/
int
fset_buffer_init ()
fset_buffer_init (void)
{
fset_buffer_set_callbacks ();
@@ -1646,7 +1646,7 @@ fset_buffer_init ()
*/
void
fset_buffer_end ()
fset_buffer_end (void)
{
if (fset_buffer)
{
+6 -6
View File
@@ -27,20 +27,20 @@ struct t_fset_option;
extern struct t_gui_buffer *fset_buffer;
extern int fset_buffer_selected_line;
extern void fset_buffer_set_title ();
extern void fset_buffer_set_title (void);
extern int fset_buffer_display_option (struct t_fset_option *fset_option);
extern void fset_buffer_refresh (int clear);
extern void fset_buffer_set_current_line (int line);
extern void fset_buffer_check_line_outside_window ();
extern void fset_buffer_check_line_outside_window (void);
extern int fset_buffer_window_scrolled_cb (const void *pointer,
void *data,
const char *signal,
const char *type_data,
void *signal_data);
extern void fset_buffer_set_keys (struct t_hashtable *hashtable);
extern void fset_buffer_set_localvar_filter ();
extern void fset_buffer_open ();
extern int fset_buffer_init ();
extern void fset_buffer_end ();
extern void fset_buffer_set_localvar_filter (void);
extern void fset_buffer_open (void);
extern int fset_buffer_init (void);
extern void fset_buffer_end (void);
#endif /* WEECHAT_PLUGIN_FSET_BUFFER_H */
+1 -1
View File
@@ -638,7 +638,7 @@ fset_command_run_key_cb (const void *pointer, void *data,
*/
void
fset_command_init ()
fset_command_init (void)
{
weechat_hook_command (
"fset",
+1 -1
View File
@@ -20,6 +20,6 @@
#ifndef WEECHAT_PLUGIN_FSET_COMMAND_H
#define WEECHAT_PLUGIN_FSET_COMMAND_H
extern void fset_command_init ();
extern void fset_command_init (void);
#endif /* WEECHAT_PLUGIN_FSET_COMMAND_H */
+1 -1
View File
@@ -115,7 +115,7 @@ fset_completion_option_cb (const void *pointer, void *data,
*/
void
fset_completion_init ()
fset_completion_init (void)
{
weechat_hook_completion ("fset_options",
N_("configuration files, sections, options and "
+1 -1
View File
@@ -20,6 +20,6 @@
#ifndef WEECHAT_PLUGIN_FSET_COMPLETION_H
#define WEECHAT_PLUGIN_FSET_COMPLETION_H
extern void fset_completion_init ();
extern void fset_completion_init (void);
#endif /* WEECHAT_PLUGIN_FSET_COMPLETION_H */
+4 -4
View File
@@ -365,7 +365,7 @@ fset_config_change_title_color_cb (const void *pointer, void *data,
*/
int
fset_config_init ()
fset_config_init (void)
{
fset_config_file = weechat_config_new (FSET_CONFIG_PRIO_NAME,
&fset_config_reload, NULL, NULL);
@@ -1148,7 +1148,7 @@ fset_config_init ()
*/
int
fset_config_read ()
fset_config_read (void)
{
int rc;
@@ -1169,7 +1169,7 @@ fset_config_read ()
*/
int
fset_config_write ()
fset_config_write (void)
{
return weechat_config_write (fset_config_file);
}
@@ -1179,7 +1179,7 @@ fset_config_write ()
*/
void
fset_config_free ()
fset_config_free (void)
{
weechat_config_free (fset_config_file);
fset_config_file = NULL;
+4 -4
View File
@@ -88,9 +88,9 @@ extern char **fset_config_sort_fields;
extern int fset_config_sort_fields_count;
extern int fset_config_format_option_num_lines[2];
extern int fset_config_init ();
extern int fset_config_read ();
extern int fset_config_write ();
extern void fset_config_free ();
extern int fset_config_init (void);
extern int fset_config_read (void);
extern int fset_config_write (void);
extern void fset_config_free (void);
#endif /* WEECHAT_PLUGIN_FSET_CONFIG_H */
+1 -1
View File
@@ -94,7 +94,7 @@ fset_info_infolist_fset_option_cb (const void *pointer, void *data,
*/
void
fset_info_init ()
fset_info_init (void)
{
/* infolist hooks */
weechat_hook_infolist (
+1 -1
View File
@@ -20,6 +20,6 @@
#ifndef WEECHAT_PLUGIN_FSET_INFO_H
#define WEECHAT_PLUGIN_FSET_INFO_H
extern void fset_info_init ();
extern void fset_info_init (void);
#endif /* WEECHAT_PLUGIN_FSET_INFO_H */
+2 -2
View File
@@ -311,7 +311,7 @@ fset_mouse_hsignal_cb (const void *pointer, void *data, const char *signal,
*/
int
fset_mouse_init ()
fset_mouse_init (void)
{
struct t_hashtable *keys;
@@ -356,6 +356,6 @@ fset_mouse_init ()
*/
void
fset_mouse_end ()
fset_mouse_end (void)
{
}
+2 -2
View File
@@ -22,7 +22,7 @@
#define FSET_MOUSE_HSIGNAL "fset_mouse"
extern int fset_mouse_init ();
extern void fset_mouse_end ();
extern int fset_mouse_init (void);
extern void fset_mouse_end (void);
#endif /* WEECHAT_PLUGIN_FSET_MOUSE_H */
+8 -8
View File
@@ -743,7 +743,7 @@ fset_option_init_max_length (struct t_fset_option_max_length *max_length)
*/
void
fset_option_set_max_length_fields_all ()
fset_option_set_max_length_fields_all (void)
{
int i, num_options;
struct t_fset_option *ptr_fset_option;
@@ -929,7 +929,7 @@ fset_option_free_cb (void *data, struct t_arraylist *arraylist, void *pointer)
*/
struct t_arraylist *
fset_option_get_arraylist_options ()
fset_option_get_arraylist_options (void)
{
return weechat_arraylist_new (100, 1, 0,
&fset_option_compare_options_cb, NULL,
@@ -941,7 +941,7 @@ fset_option_get_arraylist_options ()
*/
struct t_fset_option_max_length *
fset_option_get_max_length ()
fset_option_get_max_length (void)
{
struct t_fset_option_max_length *max_length;
@@ -957,7 +957,7 @@ fset_option_get_max_length ()
*/
void
fset_option_get_options ()
fset_option_get_options (void)
{
struct t_fset_option *new_fset_option, *ptr_fset_option;
struct t_config_file *ptr_config;
@@ -1278,7 +1278,7 @@ fset_option_mark_options_matching_filter (const char *filter, int mark)
*/
void
fset_option_unmark_all ()
fset_option_unmark_all (void)
{
int num_options, marked, set_title, i;
struct t_fset_option *ptr_fset_option;
@@ -1772,7 +1772,7 @@ fset_option_add_to_infolist (struct t_infolist *infolist,
*/
void
fset_option_print_log ()
fset_option_print_log (void)
{
struct t_fset_option *ptr_fset_option;
int num_options, i;
@@ -1815,7 +1815,7 @@ fset_option_print_log ()
*/
int
fset_option_init ()
fset_option_init (void)
{
fset_options = fset_option_get_arraylist_options ();
if (!fset_options)
@@ -1891,7 +1891,7 @@ fset_option_init ()
*/
void
fset_option_end ()
fset_option_end (void)
{
if (fset_options)
{
+8 -8
View File
@@ -95,11 +95,11 @@ extern int fset_option_valid (struct t_fset_option *option);
extern struct t_fset_option *fset_option_search_by_name (const char *name,
int *line);
extern int fset_option_value_is_changed (struct t_fset_option *option);
extern void fset_option_set_max_length_fields_all ();
extern void fset_option_set_max_length_fields_all (void);
extern void fset_option_free (struct t_fset_option *fset_option);
extern struct t_arraylist *fset_option_get_arraylist_options ();
extern struct t_fset_option_max_length *fset_option_get_max_length ();
extern void fset_option_get_options ();
extern struct t_arraylist *fset_option_get_arraylist_options (void);
extern struct t_fset_option_max_length *fset_option_get_max_length (void);
extern void fset_option_get_options (void);
extern void fset_option_set_filter (const char *filter);
extern void fset_option_filter_options (const char *filter);
extern void fset_option_toggle_value (struct t_fset_option *fset_option,
@@ -119,7 +119,7 @@ extern void fset_option_toggle_mark (struct t_fset_option *fset_option,
struct t_config_option *option);
extern void fset_option_mark_options_matching_filter (const char *filter,
int mark);
extern void fset_option_unmark_all ();
extern void fset_option_unmark_all (void);
extern int fset_option_export (const char *filename, int with_help);
extern int fset_option_import (const char *filename);
extern int fset_option_config_cb (const void *pointer,
@@ -131,8 +131,8 @@ extern struct t_hdata *fset_option_hdata_option_cb (const void *pointer,
const char *hdata_name);
extern int fset_option_add_to_infolist (struct t_infolist *infolist,
struct t_fset_option *option);
extern void fset_option_print_log ();
extern int fset_option_init ();
extern void fset_option_end ();
extern void fset_option_print_log (void);
extern int fset_option_init (void);
extern void fset_option_end (void);
#endif /* WEECHAT_PLUGIN_FSET_OPTION_H */
+1 -1
View File
@@ -86,7 +86,7 @@ fset_debug_dump_cb (const void *pointer, void *data,
*/
void
fset_add_bar ()
fset_add_bar (void)
{
weechat_bar_new (
FSET_BAR_NAME, "off", "0", "window",
+1 -1
View File
@@ -33,6 +33,6 @@ extern struct t_hdata *fset_hdata_config_section;
extern struct t_hdata *fset_hdata_config_option;
extern struct t_hdata *fset_hdata_fset_option;
extern void fset_add_bar ();
extern void fset_add_bar (void);
#endif /* WEECHAT_PLUGIN_FSET_H */