mirror of
https://github.com/weechat/weechat.git
synced 2026-07-02 07:46:38 +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
@@ -105,7 +105,7 @@ trigger_buffer_set_filter (const char *filter)
|
||||
*/
|
||||
|
||||
void
|
||||
trigger_buffer_set_title ()
|
||||
trigger_buffer_set_title (void)
|
||||
{
|
||||
const char *ptr_filter;
|
||||
char title[1024];
|
||||
@@ -174,7 +174,7 @@ trigger_buffer_close_cb (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
void
|
||||
trigger_buffer_set_callbacks ()
|
||||
trigger_buffer_set_callbacks (void)
|
||||
{
|
||||
struct t_gui_buffer *ptr_buffer;
|
||||
|
||||
@@ -383,7 +383,7 @@ trigger_buffer_display_trigger (struct t_trigger *trigger,
|
||||
*/
|
||||
|
||||
void
|
||||
trigger_buffer_end ()
|
||||
trigger_buffer_end (void)
|
||||
{
|
||||
if (trigger_buffer)
|
||||
{
|
||||
|
||||
@@ -26,10 +26,10 @@ struct t_trigger_context;
|
||||
|
||||
extern struct t_gui_buffer *trigger_buffer;
|
||||
|
||||
extern void trigger_buffer_set_callbacks ();
|
||||
extern void trigger_buffer_set_callbacks (void);
|
||||
extern void trigger_buffer_open (const char *filter, int switch_to_buffer);
|
||||
extern int trigger_buffer_display_trigger (struct t_trigger *trigger,
|
||||
struct t_trigger_context *context);
|
||||
extern void trigger_buffer_end ();
|
||||
extern void trigger_buffer_end (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_TRIGGER_BUFFER_H */
|
||||
|
||||
@@ -1484,7 +1484,7 @@ end:
|
||||
*/
|
||||
|
||||
void
|
||||
trigger_callback_init ()
|
||||
trigger_callback_init (void)
|
||||
{
|
||||
trigger_callback_hashtable_options_conditions = weechat_hashtable_new (
|
||||
32,
|
||||
@@ -1503,7 +1503,7 @@ trigger_callback_init ()
|
||||
*/
|
||||
|
||||
void
|
||||
trigger_callback_end ()
|
||||
trigger_callback_end (void)
|
||||
{
|
||||
if (trigger_callback_hashtable_options_conditions)
|
||||
{
|
||||
|
||||
@@ -150,7 +150,7 @@ extern struct t_hashtable *trigger_callback_info_hashtable_cb (const void *point
|
||||
void *data,
|
||||
const char *info_name,
|
||||
struct t_hashtable *hashtable);
|
||||
extern void trigger_callback_init ();
|
||||
extern void trigger_callback_end ();
|
||||
extern void trigger_callback_init (void);
|
||||
extern void trigger_callback_end (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_TRIGGER_CALLBACK_H */
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
*/
|
||||
|
||||
void
|
||||
trigger_command_display_status ()
|
||||
trigger_command_display_status (void)
|
||||
{
|
||||
weechat_printf_date_tags (NULL, 0, "no_trigger",
|
||||
(trigger_enabled) ?
|
||||
@@ -1252,7 +1252,7 @@ end:
|
||||
*/
|
||||
|
||||
void
|
||||
trigger_command_init ()
|
||||
trigger_command_init (void)
|
||||
{
|
||||
weechat_hook_command (
|
||||
"trigger",
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
#ifndef WEECHAT_PLUGIN_TRIGGER_COMMAND_H
|
||||
#define WEECHAT_PLUGIN_TRIGGER_COMMAND_H
|
||||
|
||||
extern void trigger_command_init ();
|
||||
extern void trigger_command_init (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_TRIGGER_COMMAND_H */
|
||||
|
||||
@@ -604,7 +604,7 @@ trigger_completion_add_arguments_cb (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
void
|
||||
trigger_completion_init ()
|
||||
trigger_completion_init (void)
|
||||
{
|
||||
weechat_hook_completion ("trigger_names",
|
||||
N_("triggers"),
|
||||
|
||||
@@ -20,6 +20,6 @@
|
||||
#ifndef WEECHAT_PLUGIN_TRIGGER_COMPLETION_H
|
||||
#define WEECHAT_PLUGIN_TRIGGER_COMPLETION_H
|
||||
|
||||
extern void trigger_completion_init ();
|
||||
extern void trigger_completion_init (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_TRIGGER_COMPLETION_H */
|
||||
|
||||
@@ -485,7 +485,7 @@ trigger_config_create_option_temp (struct t_trigger *temp_trigger,
|
||||
*/
|
||||
|
||||
void
|
||||
trigger_config_use_temp_triggers ()
|
||||
trigger_config_use_temp_triggers (void)
|
||||
{
|
||||
struct t_trigger *ptr_temp_trigger, *next_temp_trigger;
|
||||
int i, num_options_ok;
|
||||
@@ -684,7 +684,7 @@ trigger_config_reload_cb (const void *pointer, void *data,
|
||||
*/
|
||||
|
||||
int
|
||||
trigger_config_init ()
|
||||
trigger_config_init (void)
|
||||
{
|
||||
trigger_config_file = weechat_config_new (
|
||||
TRIGGER_CONFIG_PRIO_NAME,
|
||||
@@ -799,7 +799,7 @@ trigger_config_init ()
|
||||
*/
|
||||
|
||||
int
|
||||
trigger_config_read ()
|
||||
trigger_config_read (void)
|
||||
{
|
||||
int rc;
|
||||
|
||||
@@ -815,7 +815,7 @@ trigger_config_read ()
|
||||
*/
|
||||
|
||||
int
|
||||
trigger_config_write ()
|
||||
trigger_config_write (void)
|
||||
{
|
||||
return weechat_config_write (trigger_config_file);
|
||||
}
|
||||
@@ -825,7 +825,7 @@ trigger_config_write ()
|
||||
*/
|
||||
|
||||
void
|
||||
trigger_config_free ()
|
||||
trigger_config_free (void)
|
||||
{
|
||||
weechat_config_free (trigger_config_file);
|
||||
trigger_config_file = NULL;
|
||||
|
||||
@@ -47,9 +47,9 @@ extern char *trigger_config_default_list[][1 + TRIGGER_NUM_OPTIONS];
|
||||
extern struct t_config_option *trigger_config_create_trigger_option (const char *trigger_name,
|
||||
int index_option,
|
||||
const char *value);
|
||||
extern int trigger_config_init ();
|
||||
extern int trigger_config_read ();
|
||||
extern int trigger_config_write ();
|
||||
extern void trigger_config_free ();
|
||||
extern int trigger_config_init (void);
|
||||
extern int trigger_config_read (void);
|
||||
extern int trigger_config_write (void);
|
||||
extern void trigger_config_free (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_TRIGGER_CONFIG_H */
|
||||
|
||||
@@ -1101,7 +1101,7 @@ trigger_new (const char *name, const char *enabled, const char *hook,
|
||||
*/
|
||||
|
||||
void
|
||||
trigger_create_default ()
|
||||
trigger_create_default (void)
|
||||
{
|
||||
int i;
|
||||
|
||||
@@ -1244,7 +1244,7 @@ trigger_free (struct t_trigger *trigger)
|
||||
*/
|
||||
|
||||
void
|
||||
trigger_free_all ()
|
||||
trigger_free_all (void)
|
||||
{
|
||||
while (triggers)
|
||||
{
|
||||
@@ -1257,7 +1257,7 @@ trigger_free_all ()
|
||||
*/
|
||||
|
||||
void
|
||||
trigger_print_log ()
|
||||
trigger_print_log (void)
|
||||
{
|
||||
struct t_trigger *ptr_trigger;
|
||||
int i;
|
||||
|
||||
@@ -178,11 +178,11 @@ extern struct t_trigger *trigger_new (const char *name,
|
||||
const char *command,
|
||||
const char *return_code,
|
||||
const char *post_action);
|
||||
extern void trigger_create_default ();
|
||||
extern void trigger_create_default (void);
|
||||
extern int trigger_rename (struct t_trigger *trigger, const char *name);
|
||||
extern struct t_trigger *trigger_copy (struct t_trigger *trigger,
|
||||
const char *name);
|
||||
extern void trigger_free (struct t_trigger *trigger);
|
||||
extern void trigger_free_all ();
|
||||
extern void trigger_free_all (void);
|
||||
|
||||
#endif /* WEECHAT_PLUGIN_TRIGGER_H */
|
||||
|
||||
Reference in New Issue
Block a user