From 3b6c5299be35fe97f89e30a1bdad8b9db216726b Mon Sep 17 00:00:00 2001 From: Benedikt Heine Date: Tue, 20 Feb 2018 16:23:56 +0100 Subject: [PATCH] Use void as argument for parameterless functions --- src/queues.c | 10 +++++----- src/queues.h | 10 +++++----- src/x11/screen.c | 22 +++++++++++----------- src/x11/screen.h | 4 ++-- src/x11/x.c | 4 ++-- 5 files changed, 25 insertions(+), 25 deletions(-) diff --git a/src/queues.c b/src/queues.c index 94c0c7f..973cd1f 100644 --- a/src/queues.c +++ b/src/queues.c @@ -35,19 +35,19 @@ void queues_displayed_limit(unsigned int limit) } /* misc getter functions */ -const GList *queues_get_displayed() +const GList *queues_get_displayed(void) { return g_queue_peek_head_link(displayed); } -unsigned int queues_length_waiting() +unsigned int queues_length_waiting(void) { return waiting->length; } -unsigned int queues_length_displayed() +unsigned int queues_length_displayed(void) { return displayed->length; } -unsigned int queues_length_history() +unsigned int queues_length_history(void) { return history->length; } @@ -292,7 +292,7 @@ void queues_check_timeouts(bool idle) } } -void queues_update() +void queues_update(void) { if (pause_displayed) { while (displayed->length > 0) { diff --git a/src/queues.h b/src/queues.h index dab452b..68b8cd3 100644 --- a/src/queues.h +++ b/src/queues.h @@ -20,15 +20,15 @@ void queues_displayed_limit(unsigned int limit); /* * Return read only list of notifications */ -const GList *queues_get_displayed(); +const GList *queues_get_displayed(void); /* * Returns the current amount of notifications, * which are shown, waiting or already in history */ -unsigned int queues_length_waiting(); -unsigned int queues_length_displayed(); -unsigned int queues_length_history(); +unsigned int queues_length_waiting(void); +unsigned int queues_length_displayed(void); +unsigned int queues_length_history(void); /* * Insert a fully initialized notification into queues @@ -98,7 +98,7 @@ void queues_check_timeouts(bool idle); * and show them. In displayed queue, the amount of elements is limited * to the amount set via queues_displayed_limit */ -void queues_update(); +void queues_update(void); /* * Return the distance to the next event in the queue, diff --git a/src/x11/screen.c b/src/x11/screen.c index 51bc230..070c1f1 100644 --- a/src/x11/screen.c +++ b/src/x11/screen.c @@ -29,16 +29,16 @@ int randr_event_base = 0; static int randr_major_version = 0; static int randr_minor_version = 0; -void randr_init(); -void randr_update(); -void xinerama_update(); -void screen_update_fallback(); +void randr_init(void); +void randr_update(void); +void xinerama_update(void); +void screen_update_fallback(void); static void x_follow_setup_error_handler(void); static int x_follow_tear_down_error_handler(void); static int FollowXErrorHandler(Display *display, XErrorEvent *e); static Window get_focused_window(void); -static double get_xft_dpi_value() +static double get_xft_dpi_value(void) { static double dpi = -1; //Only run this once, we don't expect dpi changes during runtime @@ -65,7 +65,7 @@ static double get_xft_dpi_value() return dpi; } -void init_screens() +void init_screens(void) { if (!settings.force_xinerama) { randr_init(); @@ -87,7 +87,7 @@ void alloc_screen_ar(int n) screens_len = n; } -void randr_init() +void randr_init(void) { int randr_error_base = 0; if (!XRRQueryExtension(xctx.dpy, &randr_event_base, &randr_error_base)) { @@ -99,7 +99,7 @@ void randr_init() XRRSelectInput(xctx.dpy, RootWindow(xctx.dpy, DefaultScreen(xctx.dpy)), RRScreenChangeNotifyMask); } -void randr_update() +void randr_update(void) { if (randr_major_version < 1 || (randr_major_version == 1 && randr_minor_version < 5)) { @@ -148,7 +148,7 @@ void screen_check_event(XEvent event) randr_update(); } -void xinerama_update() +void xinerama_update(void) { int n; XineramaScreenInfo *info = XineramaQueryScreens(xctx.dpy, &n); @@ -172,7 +172,7 @@ void xinerama_update() XFree(info); } -void screen_update_fallback() +void screen_update_fallback(void) { alloc_screen_ar(1); @@ -190,7 +190,7 @@ void screen_update_fallback() * Select the screen on which the Window * should be displayed. */ -screen_info *get_active_screen() +screen_info *get_active_screen(void) { int ret = 0; if (settings.monitor > 0 && settings.monitor < screens_len) { diff --git a/src/x11/screen.h b/src/x11/screen.h index 8b47142..ed71081 100644 --- a/src/x11/screen.h +++ b/src/x11/screen.h @@ -21,10 +21,10 @@ typedef struct _screen_info { dimension_t dim; } screen_info; -void init_screens(); +void init_screens(void); void screen_check_event(XEvent event); -screen_info *get_active_screen(); +screen_info *get_active_screen(void); double get_dpi_for_screen(screen_info *scr); #endif diff --git a/src/x11/x.c b/src/x11/x.c index 2df610b..92942da 100644 --- a/src/x11/x.c +++ b/src/x11/x.c @@ -773,7 +773,7 @@ static void setopacity(Window win, unsigned long opacity) /* * Returns the modifier which is NumLock. */ -static KeySym x_numlock_mod() +static KeySym x_numlock_mod(void) { static KeyCode nl = 0; KeySym sym = 0; @@ -1199,7 +1199,7 @@ void x_win_show(void) /* * Hide the window and ungrab unused keyboard_shortcuts */ -void x_win_hide() +void x_win_hide(void) { x_shortcut_ungrab(&settings.close_ks); x_shortcut_ungrab(&settings.close_all_ks);