mirror of https://github.com/0intro/wmii
Fixed warnings/errors on linux.
This commit is contained in:
parent
4ebbc14e24
commit
ed397a40d1
3
Makefile
3
Makefile
|
@ -18,11 +18,12 @@ config:
|
|||
ROOT="${ROOT}" ${ROOT}/util/genconfig
|
||||
|
||||
deb-dep:
|
||||
apt-get -qq install build-essential debhelper libxext-dev x11proto-xext-dev libx11-dev
|
||||
apt-get -qq install build-essential debhelper libxext-dev x11proto-xext-dev libx11-dev libxrandr-dev
|
||||
|
||||
deb:
|
||||
dpkg-buildpackage -rfakeroot
|
||||
|
||||
include ${ROOT}/mk/dir.mk
|
||||
INSTDIRS = ${PDIRS}
|
||||
.PHONY: config
|
||||
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "dat.h"
|
||||
#include <assert.h>
|
||||
#include <math.h>
|
||||
#include <sys/limits.h>
|
||||
#include <limits.h>
|
||||
#include "fns.h"
|
||||
|
||||
Client*
|
||||
|
|
|
@ -120,6 +120,7 @@ bar_draw(WMScreen *s) {
|
|||
b->smaller = *pb;
|
||||
*pb = b;
|
||||
}
|
||||
SET(shrink);
|
||||
for(tb = largest; tb; tb = tb->smaller) {
|
||||
width -= Dx(tb->r);
|
||||
tw += Dx(tb->r);
|
||||
|
@ -128,7 +129,6 @@ bar_draw(WMScreen *s) {
|
|||
if(Dx(tb->r) * shrink >= Dx(tb->smaller->r))
|
||||
break;
|
||||
}
|
||||
SET(shrink);
|
||||
if(tb)
|
||||
for(b = largest; b != tb->smaller; b = b->smaller)
|
||||
b->r.max.x *= shrink;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
*/
|
||||
#include "dat.h"
|
||||
#include <assert.h>
|
||||
#include <sys/limits.h>
|
||||
#include <limits.h>
|
||||
#include "fns.h"
|
||||
|
||||
Window *ewmhwin;
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
* See LICENSE file for license details.
|
||||
*/
|
||||
#include "dat.h"
|
||||
#include <sys/limits.h>
|
||||
#include <limits.h>
|
||||
#include "fns.h"
|
||||
|
||||
static void float_placeframe(Frame*);
|
||||
|
@ -123,6 +123,7 @@ float_placeframe(Frame *f) {
|
|||
vp2 = vptemp;
|
||||
}
|
||||
|
||||
p = ZP; /* SET(p) */
|
||||
if(vp->n == 0) {
|
||||
p.x = random() % max(0, Dx(a->r) - dim.x);
|
||||
p.y = random() % max(0, Dy(a->r) - dim.y);
|
||||
|
|
|
@ -169,7 +169,8 @@ static Key *
|
|||
match_keys(Key *k, ulong mod, KeyCode keycode, bool seq) {
|
||||
Key *ret = nil, *next;
|
||||
|
||||
for(next = k->tnext; k; (k=next) && (next=k->tnext)) {
|
||||
/* I *hate* GCC 4. */
|
||||
for(next = k->tnext; k; (void)((k=next) && (next=k->tnext))) {
|
||||
if(seq)
|
||||
k = k->next;
|
||||
if(k && (k->mod == mod) && (k->key == keycode)) {
|
||||
|
|
|
@ -719,6 +719,9 @@ mouse_resize(Client *c, bool grabbox, Align align) {
|
|||
hr = subpt(frect.max, frect.min);
|
||||
hr = divpt(hr, Pt(2, 2));
|
||||
|
||||
SET(hrx);
|
||||
SET(hry);
|
||||
|
||||
if(align != Center) {
|
||||
d = hr;
|
||||
if(align&North) d.y -= hr.y;
|
||||
|
@ -757,8 +760,6 @@ mouse_resize(Client *c, bool grabbox, Align align) {
|
|||
d.y = ev.xmotion.y_root;
|
||||
|
||||
if(align == Center && !grabbox) {
|
||||
SET(hrx);
|
||||
SET(hry);
|
||||
d.x = (d.x * hrx) - pt.x;
|
||||
d.y = (d.y * hry) - pt.y;
|
||||
}else
|
||||
|
|
|
@ -76,5 +76,6 @@ _used(long a, ...) {
|
|||
# undef USED
|
||||
# undef SET
|
||||
# define USED(...) _used((long)__VA_ARGS__)
|
||||
# define SET(x) USED(&x)
|
||||
# define SET(x) (x = 0)
|
||||
/* # define SET(x) USED(&x) GCC 4 is 'too smart' for this. */
|
||||
#endif
|
||||
|
|
|
@ -77,8 +77,9 @@ install: printinstall mkdirs
|
|||
depend: cleandep
|
||||
|
||||
FILTER = cat
|
||||
COMPILE= CC="$(CC)" CFLAGS="$(CFLAGS)" $(ROOT)/util/compile
|
||||
COMPILEPIC= CC="$(CC)" CFLAGS="$(CFLAGS) $(SOCFLAGS)" $(ROOT)/util/compile
|
||||
EXCFLAGS = -I$$(echo $(INCPATH)|sed 's/:/ -I/g') -D_XOPEN_SOURCE=600
|
||||
COMPILE= CC="$(CC)" CFLAGS="$(EXCFLAGS) $(CFLAGS)" $(ROOT)/util/compile
|
||||
COMPILEPIC= CC="$(CC)" CFLAGS="$(EXCFLAGS) $(CFLAGS) $(SOCFLAGS)" $(ROOT)/util/compile
|
||||
LINK= LD="$(LD)" LDFLAGS="$(LDFLAGS)" $(ROOT)/util/link
|
||||
LINKSO= LD="$(LD)" LDFLAGS="$(SOLDFLAGS)" $(ROOT)/util/link
|
||||
CLEANNAME=$(ROOT)/util/cleanname
|
||||
|
@ -91,6 +92,5 @@ MKCFG:=${shell $(MKCFGSH)}
|
|||
MKCFG!=${MKCFGSH}
|
||||
include $(MKCFG)
|
||||
|
||||
CFLAGS += -I$$(echo $(INCPATH)|sed 's/:/ -I/g')
|
||||
include $(ROOT)/mk/common.mk
|
||||
|
||||
|
|
|
@ -26,7 +26,7 @@ $LD -o $outfile $ofiles $LDFLAGS $args >$xtmp 2>&1
|
|||
status=$?
|
||||
|
||||
sed 's/.*: In function `[^:]*: *//' $xtmp | egrep . |
|
||||
egrep -v 'is almost always misused|is dangerous, better use'
|
||||
egrep -v 'is almost always misused|is dangerous, better use|in statically linked applications requires at runtime'
|
||||
rm -f $xtmp
|
||||
|
||||
exit $status
|
||||
|
|
Loading…
Reference in New Issue