mirror of
https://github.com/weechat/weechat.git
synced 2026-06-28 13:56:37 +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
@@ -46,7 +46,7 @@ void script_action_run_install (int quiet);
|
||||
*/
|
||||
|
||||
void
|
||||
script_action_run_list ()
|
||||
script_action_run_list (void)
|
||||
{
|
||||
int i, scripts_loaded;
|
||||
char hdata_name[128];
|
||||
@@ -646,7 +646,7 @@ script_action_install_url_cb (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
struct t_script_repo *
|
||||
script_action_get_next_script_to_install ()
|
||||
script_action_get_next_script_to_install (void)
|
||||
{
|
||||
struct t_script_repo *ptr_script, *ptr_script_to_install;
|
||||
|
||||
@@ -1200,7 +1200,7 @@ script_action_run_show (const char *name, int quiet)
|
||||
*/
|
||||
|
||||
void
|
||||
script_action_run_showdiff ()
|
||||
script_action_run_showdiff (void)
|
||||
{
|
||||
char str_command[64];
|
||||
struct t_gui_window *window;
|
||||
@@ -1263,7 +1263,7 @@ script_action_add (struct t_gui_buffer *buffer, const char *action)
|
||||
*/
|
||||
|
||||
void
|
||||
script_action_clear ()
|
||||
script_action_clear (void)
|
||||
{
|
||||
if (script_actions)
|
||||
weechat_string_dyn_copy (script_actions, NULL);
|
||||
@@ -1278,7 +1278,7 @@ script_action_clear ()
|
||||
*/
|
||||
|
||||
int
|
||||
script_action_run_all ()
|
||||
script_action_run_all (void)
|
||||
{
|
||||
char **actions, **argv, **argv_eol, *ptr_action;
|
||||
int num_actions, argc, i, j, quiet, script_found;
|
||||
@@ -1623,7 +1623,7 @@ script_action_schedule (struct t_gui_buffer *buffer,
|
||||
*/
|
||||
|
||||
void
|
||||
script_action_end ()
|
||||
script_action_end (void)
|
||||
{
|
||||
if (script_actions)
|
||||
{
|
||||
|
||||
@@ -22,12 +22,12 @@
|
||||
|
||||
extern char **script_actions;
|
||||
|
||||
extern int script_action_run_all ();
|
||||
extern int script_action_run_all (void);
|
||||
extern void script_action_schedule (struct t_gui_buffer *buffer,
|
||||
const char *action,
|
||||
int need_repository,
|
||||
int error_repository,
|
||||
int quiet);
|
||||
extern void script_action_end ();
|
||||
extern void script_action_end (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_SCRIPT_ACTION_H */
|
||||
|
||||
@@ -901,7 +901,7 @@ script_buffer_get_window_info (struct t_gui_window *window,
|
||||
*/
|
||||
|
||||
void
|
||||
script_buffer_check_line_outside_window ()
|
||||
script_buffer_check_line_outside_window (void)
|
||||
{
|
||||
struct t_gui_window *window;
|
||||
int start_line_y, chat_height;
|
||||
@@ -1073,7 +1073,7 @@ script_buffer_close_cb (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
void
|
||||
script_buffer_set_callbacks ()
|
||||
script_buffer_set_callbacks (void)
|
||||
{
|
||||
struct t_gui_buffer *ptr_buffer;
|
||||
|
||||
@@ -1142,7 +1142,7 @@ script_buffer_set_keys (struct t_hashtable *hashtable)
|
||||
*/
|
||||
|
||||
void
|
||||
script_buffer_set_localvar_filter ()
|
||||
script_buffer_set_localvar_filter (void)
|
||||
{
|
||||
if (!script_buffer)
|
||||
return;
|
||||
@@ -1156,7 +1156,7 @@ script_buffer_set_localvar_filter ()
|
||||
*/
|
||||
|
||||
void
|
||||
script_buffer_open ()
|
||||
script_buffer_open (void)
|
||||
{
|
||||
struct t_hashtable *buffer_props;
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ extern void script_buffer_set_current_line (int line);
|
||||
extern void script_buffer_show_detail_script (struct t_script_repo *script);
|
||||
extern void script_buffer_get_window_info (struct t_gui_window *window,
|
||||
int *start_line_y, int *chat_height);
|
||||
extern void script_buffer_check_line_outside_window ();
|
||||
extern void script_buffer_check_line_outside_window (void);
|
||||
extern int script_buffer_window_scrolled_cb (const void *pointer, void *data,
|
||||
const char *signal,
|
||||
const char *type_data,
|
||||
@@ -45,9 +45,9 @@ extern int script_buffer_input_cb (const void *pointer, void *data,
|
||||
const char *input_data);
|
||||
extern int script_buffer_close_cb (const void *pointer, void *data,
|
||||
struct t_gui_buffer *buffer);
|
||||
extern void script_buffer_set_callbacks ();
|
||||
extern void script_buffer_set_callbacks (void);
|
||||
extern void script_buffer_set_keys (struct t_hashtable *hashtable);
|
||||
extern void script_buffer_set_localvar_filter ();
|
||||
extern void script_buffer_open ();
|
||||
extern void script_buffer_set_localvar_filter (void);
|
||||
extern void script_buffer_open (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_SCRIPT_BUFFER_H */
|
||||
|
||||
@@ -315,7 +315,7 @@ script_command_script (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
void
|
||||
script_command_init ()
|
||||
script_command_init (void)
|
||||
{
|
||||
weechat_hook_command (
|
||||
"script",
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
#ifndef WEECHAT_PLUGIN_SCRIPT_COMMAND_H
|
||||
#define WEECHAT_PLUGIN_SCRIPT_COMMAND_H
|
||||
|
||||
extern void script_command_init ();
|
||||
extern void script_command_init (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_SCRIPT_COMMAND_H */
|
||||
|
||||
@@ -287,7 +287,7 @@ script_completion_tags_cb (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
void
|
||||
script_completion_init ()
|
||||
script_completion_init (void)
|
||||
{
|
||||
weechat_hook_completion ("script_languages",
|
||||
N_("list of script languages"),
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
#ifndef WEECHAT_PLUGIN_SCRIPT_COMPLETION_H
|
||||
#define WEECHAT_PLUGIN_SCRIPT_COMPLETION_H
|
||||
|
||||
extern void script_completion_init ();
|
||||
extern void script_completion_init (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_SCRIPT_COMPLETION_H */
|
||||
|
||||
@@ -101,7 +101,7 @@ struct t_config_option *script_config_scripts_url = NULL;
|
||||
*/
|
||||
|
||||
const char *
|
||||
script_config_get_diff_command ()
|
||||
script_config_get_diff_command (void)
|
||||
{
|
||||
const char *diff_command;
|
||||
char *dir_separator;
|
||||
@@ -159,7 +159,7 @@ script_config_get_diff_command ()
|
||||
*/
|
||||
|
||||
char *
|
||||
script_config_get_xml_filename ()
|
||||
script_config_get_xml_filename (void)
|
||||
{
|
||||
char *path, *filename;
|
||||
struct t_hashtable *options;
|
||||
@@ -403,7 +403,7 @@ script_config_reload (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
int
|
||||
script_config_init ()
|
||||
script_config_init (void)
|
||||
{
|
||||
script_config_file = weechat_config_new (
|
||||
SCRIPT_CONFIG_PRIO_NAME,
|
||||
@@ -798,7 +798,7 @@ script_config_init ()
|
||||
*/
|
||||
|
||||
int
|
||||
script_config_read ()
|
||||
script_config_read (void)
|
||||
{
|
||||
return weechat_config_read (script_config_file);
|
||||
}
|
||||
@@ -808,7 +808,7 @@ script_config_read ()
|
||||
*/
|
||||
|
||||
int
|
||||
script_config_write ()
|
||||
script_config_write (void)
|
||||
{
|
||||
return weechat_config_write (script_config_file);
|
||||
}
|
||||
@@ -818,7 +818,7 @@ script_config_write ()
|
||||
*/
|
||||
|
||||
void
|
||||
script_config_free ()
|
||||
script_config_free (void)
|
||||
{
|
||||
weechat_config_free (script_config_file);
|
||||
script_config_file = NULL;
|
||||
|
||||
@@ -69,15 +69,15 @@ extern struct t_config_option *script_config_scripts_hold;
|
||||
extern struct t_config_option *script_config_scripts_path;
|
||||
extern struct t_config_option *script_config_scripts_url;
|
||||
|
||||
extern const char *script_config_get_diff_command ();
|
||||
extern char *script_config_get_xml_filename ();
|
||||
extern const char *script_config_get_diff_command (void);
|
||||
extern char *script_config_get_xml_filename (void);
|
||||
extern char *script_config_get_script_download_filename (struct t_script_repo *script,
|
||||
const char *suffix);
|
||||
extern void script_config_hold (const char *name_with_extension);
|
||||
extern void script_config_unhold (const char *name_with_extension);
|
||||
extern int script_config_init ();
|
||||
extern int script_config_read ();
|
||||
extern int script_config_write ();
|
||||
extern void script_config_free ();
|
||||
extern int script_config_init (void);
|
||||
extern int script_config_read (void);
|
||||
extern int script_config_write (void);
|
||||
extern void script_config_free (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_SCRIPT_CONFIG_H */
|
||||
|
||||
@@ -220,7 +220,7 @@ script_info_infolist_script_script_cb (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
void
|
||||
script_info_init ()
|
||||
script_info_init (void)
|
||||
{
|
||||
/* info hooks */
|
||||
weechat_hook_info (
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
#ifndef WEECHAT_PLUGIN_SCRIPT_INFO_H
|
||||
#define WEECHAT_PLUGIN_SCRIPT_INFO_H
|
||||
|
||||
extern void script_info_init ();
|
||||
extern void script_info_init (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_SCRIPT_INFO_H */
|
||||
|
||||
@@ -116,7 +116,7 @@ script_mouse_focus_chat_cb (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
int
|
||||
script_mouse_init ()
|
||||
script_mouse_init (void)
|
||||
{
|
||||
struct t_hashtable *keys;
|
||||
|
||||
@@ -160,6 +160,6 @@ script_mouse_init ()
|
||||
*/
|
||||
|
||||
void
|
||||
script_mouse_end ()
|
||||
script_mouse_end (void)
|
||||
{
|
||||
}
|
||||
|
||||
@@ -20,7 +20,7 @@
|
||||
#ifndef WEECHAT_PLUGIN_SCRIPT_MOUSE_H
|
||||
#define WEECHAT_PLUGIN_SCRIPT_MOUSE_H
|
||||
|
||||
extern int script_mouse_init ();
|
||||
extern void script_mouse_end ();
|
||||
extern int script_mouse_init (void);
|
||||
extern void script_mouse_end (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_SCRIPT_MOUSE_H */
|
||||
|
||||
@@ -375,7 +375,7 @@ script_repo_get_status_desc_for_display (struct t_script_repo *script,
|
||||
*/
|
||||
|
||||
struct t_script_repo *
|
||||
script_repo_alloc ()
|
||||
script_repo_alloc (void)
|
||||
{
|
||||
struct t_script_repo *new_script;
|
||||
|
||||
@@ -688,7 +688,7 @@ script_repo_remove (struct t_script_repo *script)
|
||||
*/
|
||||
|
||||
void
|
||||
script_repo_remove_all ()
|
||||
script_repo_remove_all (void)
|
||||
{
|
||||
while (scripts_repo)
|
||||
{
|
||||
@@ -855,7 +855,7 @@ script_repo_update_status (struct t_script_repo *script)
|
||||
*/
|
||||
|
||||
void
|
||||
script_repo_update_status_all ()
|
||||
script_repo_update_status_all (void)
|
||||
{
|
||||
struct t_script_repo *ptr_script;
|
||||
|
||||
@@ -1006,7 +1006,7 @@ script_repo_filter_scripts (const char *search)
|
||||
*/
|
||||
|
||||
int
|
||||
script_repo_file_exists ()
|
||||
script_repo_file_exists (void)
|
||||
{
|
||||
char *filename;
|
||||
int rc;
|
||||
@@ -1036,7 +1036,7 @@ script_repo_file_exists ()
|
||||
*/
|
||||
|
||||
int
|
||||
script_repo_file_is_uptodate ()
|
||||
script_repo_file_is_uptodate (void)
|
||||
{
|
||||
char *filename;
|
||||
struct stat st;
|
||||
@@ -1599,7 +1599,7 @@ script_repo_add_to_infolist (struct t_infolist *infolist,
|
||||
*/
|
||||
|
||||
void
|
||||
script_repo_print_log ()
|
||||
script_repo_print_log (void)
|
||||
{
|
||||
struct t_script_repo *ptr_script;
|
||||
|
||||
|
||||
@@ -72,13 +72,13 @@ extern const char *script_repo_get_status_for_display (struct t_script_repo *scr
|
||||
int collapse);
|
||||
extern const char *script_repo_get_status_desc_for_display (struct t_script_repo *script,
|
||||
const char *list);
|
||||
extern void script_repo_remove_all ();
|
||||
extern void script_repo_remove_all (void);
|
||||
extern void script_repo_update_status (struct t_script_repo *script);
|
||||
extern void script_repo_update_status_all ();
|
||||
extern void script_repo_update_status_all (void);
|
||||
extern void script_repo_set_filter (const char *filter);
|
||||
extern void script_repo_filter_scripts (const char *search);
|
||||
extern int script_repo_file_exists ();
|
||||
extern int script_repo_file_is_uptodate ();
|
||||
extern int script_repo_file_exists (void);
|
||||
extern int script_repo_file_is_uptodate (void);
|
||||
extern int script_repo_file_read (int quiet);
|
||||
extern int script_repo_file_update (int quiet);
|
||||
extern struct t_hdata *script_repo_hdata_script_cb (const void *pointer,
|
||||
@@ -86,6 +86,6 @@ extern struct t_hdata *script_repo_hdata_script_cb (const void *pointer,
|
||||
const char *hdata_name);
|
||||
extern int script_repo_add_to_infolist (struct t_infolist *infolist,
|
||||
struct t_script_repo *script);
|
||||
extern void script_repo_print_log ();
|
||||
extern void script_repo_print_log (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_SCRIPT_REPO_H */
|
||||
|
||||
@@ -135,7 +135,7 @@ script_download_enabled (int display_error)
|
||||
*/
|
||||
|
||||
void
|
||||
script_get_loaded_plugins ()
|
||||
script_get_loaded_plugins (void)
|
||||
{
|
||||
int i, language;
|
||||
struct t_hdata *hdata;
|
||||
@@ -163,7 +163,7 @@ script_get_loaded_plugins ()
|
||||
*/
|
||||
|
||||
void
|
||||
script_get_scripts ()
|
||||
script_get_scripts (void)
|
||||
{
|
||||
int i;
|
||||
char hdata_name[128], *filename, *ptr_base_name;
|
||||
|
||||
@@ -36,7 +36,7 @@ extern struct t_hashtable *script_loaded;
|
||||
extern int script_language_search (const char *language);
|
||||
extern int script_language_search_by_extension (const char *extension);
|
||||
extern int script_download_enabled (int display_error);
|
||||
extern void script_get_loaded_plugins ();
|
||||
extern void script_get_scripts ();
|
||||
extern void script_get_loaded_plugins (void);
|
||||
extern void script_get_scripts (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_SCRIPT_H */
|
||||
|
||||
Reference in New Issue
Block a user