Use void as argument for parameterless functions

This commit is contained in:
Benedikt Heine 2018-02-20 16:23:56 +01:00
parent c3e8bedfab
commit 3b6c5299be
5 changed files with 25 additions and 25 deletions

View File

@ -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) {

View File

@ -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,

View File

@ -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) {

View File

@ -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

View File

@ -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);