aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIvan Kanakarakis <ivan.kanak@gmail.com>2012-07-23 16:18:23 +0300
committerIvan Kanakarakis <ivan.kanak@gmail.com>2012-07-23 17:41:56 +0300
commit36cbfa862e3eef53c6793f76ed3131da6f07e4c5 (patch)
tree0af07dbf23190a16ed887fa6f46b31385e571ff5
parent0748bf6e7e2e65fa721f20ca26a86e6ef070d23e (diff)
fix clang warnings
-rw-r--r--Makefile12
-rw-r--r--monsterwm.c6
2 files changed, 6 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 5539197..c0c3b2e 100644
--- a/Makefile
+++ b/Makefile
@@ -13,11 +13,6 @@ X11LIB = -L/usr/X11R6/lib -lX11
INCS = -I. -I/usr/include ${X11INC}
LIBS = -L/usr/lib -lc ${X11LIB}
-OPTFLAGS = -s -Os
-LDOPTFLAGS = -s
-DBGFLAGS = -g -O0
-LDDBGFLAGS = -g
-
CFLAGS = -std=c99 -pedantic -Wall -Wextra ${INCS} -DVERSION=\"${VERSION}\"
LDFLAGS = ${LIBS}
@@ -27,12 +22,11 @@ EXEC = ${WMNAME}
SRC = ${WMNAME}.c
OBJ = ${SRC:.c=.o}
-all: CFLAGS += ${OPTFLAGS}
-all: LDFLAGS += ${LDOPTFLAGS}
+all: CFLAGS += -Os
+all: LDFLAGS += -s
all: options ${WMNAME}
-debug: CFLAGS += ${DBGFLAGS}
-debug: LDFLAGS += ${LDDBGFLAGS}
+debug: CFLAGS += -O0 -g
debug: options ${WMNAME}
options:
diff --git a/monsterwm.c b/monsterwm.c
index 61ac75f..b6d71de 100644
--- a/monsterwm.c
+++ b/monsterwm.c
@@ -575,7 +575,7 @@ unsigned long getcolor(const char* color, const int screen) {
void grabbuttons(Client *c) {
unsigned int b, m, modifiers[] = { 0, LockMask, numlockmask, numlockmask|LockMask };
- if (CLICK_TO_FOCUS) for (m = 0; m < LENGTH(modifiers); m++)
+ for (m = 0; CLICK_TO_FOCUS && m < LENGTH(modifiers); m++)
if (c != desktops[currdeskidx].curr) XGrabButton(dis, Button1, modifiers[m],
c->win, False, BUTTONMASK, GrabModeAsync, GrabModeAsync, None, None);
else XUngrabButton(dis, Button1, modifiers[m], c->win);
@@ -665,8 +665,8 @@ void maprequest(XEvent *e) {
Desktop *d = NULL;
Client *c = NULL;
Window w = e->xmaprequest.window;
- XWindowAttributes wa = {0};
- XClassHint ch = {0};
+ XWindowAttributes wa = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
+ XClassHint ch = {0, 0};
Bool follow = False, floating = False;
int newdsk = currdeskidx;