diff --git a/config.mk b/config.mk index bdb872d11..3510f6c68 100644 --- a/config.mk +++ b/config.mk @@ -21,7 +21,7 @@ INCS = -I. -I/usr/include -I${X11INC} `pkg-config --cflags libconfuse xft cairo` LIBS = -L/usr/lib -lc -L${X11LIB} -lX11 `pkg-config --libs libconfuse xft cairo` -lXext -lXrandr -lXinerama # flags -CFLAGS = -std=gnu99 -ggdb3 -pipe -Wall -Wextra -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wsign-compare -Wunused -Winit-self -Wpointer-arith -Wredundant-decls -Wmissing-prototypes -Wmissing-format-attribute -Wmissing-noreturn -O3 ${INCS} -DVERSION=\"${VERSION}\" -DRELEASE=\"${RELEASE}\" +CFLAGS = -std=gnu99 -ggdb3 -pipe -Wall -Wextra -Wundef -Wshadow -Wcast-align -Wwrite-strings -Wsign-compare -Wunused -Winit-self -Wpointer-arith -Wredundant-decls -Wmissing-prototypes -Wmissing-format-attribute -Wmissing-noreturn -O0 ${INCS} -DVERSION=\"${VERSION}\" -DRELEASE=\"${RELEASE}\" LDFLAGS = -ggdb3 ${LIBS} CLIENTLDFLAGS = -ggdb3 diff --git a/focus.c b/focus.c index f39961228..d29d6c323 100644 --- a/focus.c +++ b/focus.c @@ -29,11 +29,11 @@ extern AwesomeConf globalconf; static FocusList * focus_get_node_by_client(Client *c) { - FocusList *fh; + FocusList *fl; - for(fh = globalconf.focus; fh; fh = fh->prev) - if(fh->client == c) - return fh; + for(fl = globalconf.focus; fl; fl = fl->prev) + if(fl->client == c) + return fl; return NULL; } @@ -86,10 +86,11 @@ focus_add_client(Client *c) void focus_delete_client(Client *c) { - FocusList *fc = focus_get_node_by_client(c), *target; - if (fc) + FocusList *target = focus_get_node_by_client(c); + + if(target) { - target = focus_detach_node(fc); + focus_detach_node(target); p_delete(&target); } }