From 7e907440f79248f76344106ce1bc5b6058f121db Mon Sep 17 00:00:00 2001 From: Ivan Kanakarakis Date: Sun, 11 Dec 2011 00:54:24 +0200 Subject: fix -Wextra extra warnings --- dminiwm.c | 52 +++++++++++++++++++++++++--------------------------- 1 file changed, 25 insertions(+), 27 deletions(-) (limited to 'dminiwm.c') diff --git a/dminiwm.c b/dminiwm.c index fdfbf4f..0c45cb3 100644 --- a/dminiwm.c +++ b/dminiwm.c @@ -93,17 +93,17 @@ static void configurerequest(XEvent *e); static void destroynotify(XEvent *e); static void enternotify(XEvent *e); static void die(const char* errstr, ...); -static int xerrorstart(Display *dis, XErrorEvent *ee); +static int xerrorstart(); static unsigned long getcolor(const char* color); static void grabkeys(void); static void keypress(XEvent *e); -static void killclient(const Arg arg); +static void killclient(); static void maprequest(XEvent *e); -static void move_down(const Arg arg); -static void move_up(const Arg arg); +static void move_down(); +static void move_up(); static void rotate_desktop(const Arg arg); -static void next_win(const Arg arg); -static void prev_win(const Arg arg); +static void next_win(); +static void prev_win(); static void cleanup(void); static void quit(const Arg arg); static void removeclient(client *c); @@ -113,13 +113,13 @@ static void save_desktop(int i); static void select_desktop(int i); static void deletewindow(Window w); static void setup(void); -static void sigchld(int unused); +static void sigchld(); static void spawn(const Arg arg); static void run(void); -static void swap_master(const Arg arg); -static void tile(void); -static void last_desktop(const Arg arg); +static void swap_master(); +static void last_desktop(); static void switch_mode(const Arg arg); +static void tile(void); static void update_current(void); #include "config.h" @@ -216,19 +216,19 @@ void removeclient(client *c) { update_current(); } -void killclient(const Arg arg) { +void killclient() { if(current == NULL) return; deletewindow(current->win); removeclient(current); } -void next_win(const Arg arg) { +void next_win() { if(current == NULL || head == NULL) return; current = (current->next == NULL) ? head : current->next; update_current(); } -void prev_win(const Arg arg) { +void prev_win() { if(current == NULL || head == NULL) return; if(current->prev == NULL) /* if(current == head) */ for(current=head; current->next; current=current->next); @@ -237,7 +237,7 @@ void prev_win(const Arg arg) { update_current(); } -void move_down(const Arg arg) { +void move_down() { if(current == NULL || current == head || current->next == NULL) return; Window tmpwin = current->win; @@ -249,7 +249,7 @@ void move_down(const Arg arg) { update_current(); } -void move_up(const Arg arg) { +void move_up() { if(current == NULL || current == head || current->prev == head) return; Window tmpwin = current->win; @@ -261,7 +261,7 @@ void move_up(const Arg arg) { update_current(); } -void swap_master(const Arg arg) { +void swap_master() { if(head->next == NULL || current == NULL || mode == MONOCYCLE) return; Window tmpwin = head->win; @@ -292,7 +292,7 @@ void change_desktop(const Arg arg) { update_current(); } -void last_desktop(const Arg arg) { +void last_desktop() { change_desktop((Arg){.i = previous_desktop}); } @@ -502,12 +502,10 @@ void resize_stack(const Arg arg) { /* ********************** Keyboard Management ********************** */ void grabkeys(void) { - int i; KeyCode code; XUngrabKey(dis, AnyKey, AnyModifier, root); - // For each shortcuts - for(i=0; iwindow, &ch)) - for(int i=0; i