JasonWoof Got questions, comments, patches, etc.? Contact Jason Woofenden
Merge branch 'master' of opensource.conformal.com:/git/scrotwm
authorMarco Peereboom <marco@conformal.com>
Tue, 25 Oct 2011 20:20:18 +0000 (15:20 -0500)
committerMarco Peereboom <marco@conformal.com>
Tue, 25 Oct 2011 20:20:18 +0000 (15:20 -0500)
Makefile
lib/Makefile
scrotwm.c

index 9e2e5f1..af73051 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -23,5 +23,19 @@ MANDIR= ${PREFIX}/man/man
 
 obj: _xenocara_obj
 
+# clang targets
+.if ${.TARGETS:M*analyze*}
+CC=clang
+CXX=clang++
+CPP=clang -E
+CFLAGS+=--analyze
+.elif ${.TARGETS:M*clang*}
+CC=clang
+CXX=clang++
+CPP=clang -E
+.endif
+
+analyze: all
+clang: all
 .include <bsd.prog.mk>
 .include <bsd.xorg.mk>
index e7c9ebe..e6b26dd 100644 (file)
@@ -12,7 +12,7 @@ LIBDIR= ${X11BASE}/lib
 DEBUGLIBS= no
 NOPROFILE= yes
 
-CFLAGS+=-Wall -Wno-uninitialized -ggdb3
+CFLAGS+=-Wall -Wno-uninitialized -ggdb3 -fPIC
 CFLAGS+= -I${X11BASE}/include
 
 install:
index 9f7ea21..55bf753 100644 (file)
--- a/scrotwm.c
+++ b/scrotwm.c
@@ -4828,7 +4828,8 @@ setautorun(char *selector, char *value, int flags)
 int
 setlayout(char *selector, char *value, int flags)
 {
-       int                     ws_id, st, i, x, mg, ma, si, raise;
+       int                     ws_id, i, x, mg, ma, si, raise;
+       int                     st = SWM_V_STACK;
        char                    s[1024];
        struct workspace        *ws;
 
@@ -5468,7 +5469,6 @@ buttonpress(XEvent *e)
 
        DNPRINTF(SWM_D_EVENT, "buttonpress: window: %lu\n", ev->window);
 
-       action = root_click;
        if ((win = find_window(ev->window)) == NULL)
                return;