commit b340936d27de03abe3420683f986c915a61e2532
parent 0d268397c51eed55df9a3af7a6f70dd8a838272f
Author: Kris Maglione <kris@suckless.org>
Date: Wed, 14 Sep 2011 17:45:29 -0400
Fix compiler warnings.
Diffstat:
9 files changed, 18 insertions(+), 30 deletions(-)
diff --git a/cmd/tray/main.c b/cmd/tray/main.c
@@ -188,7 +188,7 @@ main(int argc, char *argv[]) {
xext_init();
tray_init();
- client_init(nil);
+ client_init(address);
if(tray.edge == 0)
tray.edge = West | (!strcmp(readctl("/ctl", "bar on "), "top") ? North : South);
diff --git a/cmd/wmii/client.c b/cmd/wmii/client.c
@@ -251,7 +251,6 @@ apply_rules(Client *c) {
void
client_manage(Client *c) {
Client *leader;
- Frame *f;
char *tags;
bool dotags;
@@ -290,17 +289,17 @@ client_manage(Client *c) {
&& !client_viewframe(group_leader(c->group),
c->sel->view);
- f = c->sel;
+ /* f = c->sel; */
if(!(c->w.ewmh.type & TypeSplash))
- if(newgroup) {
- /* XXX: Look over this.
- if(f->area != f->view->sel)
- f->view->oldsel = f->view->sel;
- */
- }else {
- frame_restack(c->sel, c->sel->area->sel);
- view_restack(c->sel->view);
- }
+ if(newgroup) {
+ /* XXX: Look over this.
+ if(f->area != f->view->sel)
+ f->view->oldsel = f->view->sel;
+ */
+ }else {
+ frame_restack(c->sel, c->sel->area->sel);
+ view_restack(c->sel->view);
+ }
}
void
@@ -874,7 +873,7 @@ client_prop(Client *c, Atom a) {
/* Handlers */
static bool
configreq_event(Window *w, void *aux, XConfigureRequestEvent *e) {
- Rectangle r, cr;
+ Rectangle r;
Client *c;
c = aux;
@@ -895,7 +894,6 @@ configreq_event(Window *w, void *aux, XConfigureRequestEvent *e) {
c->border = e->border_width;
r.max = addpt(r.min, r.max);
- cr = r;
r = client_grav(c, r);
if(c->sel->area->floating)
diff --git a/cmd/wmii/column.c b/cmd/wmii/column.c
@@ -143,14 +143,15 @@ static void column_scale(Area*);
void
column_attachrect(Area *a, Frame *f, Rectangle r) {
Frame *fp, *pos;
- int before, after;
pos = nil;
for(fp=a->frame; fp; pos=fp, fp=fp->anext) {
if(r.max.y < fp->r.min.y || r.min.y > fp->r.max.y)
continue;
+ /*
before = fp->r.min.y - r.min.y;
after = -fp->r.max.y + r.max.y;
+ */
}
column_insert(a, f, pos);
column_resizeframe_h(f, r);
diff --git a/cmd/wmii/ewmh.c b/cmd/wmii/ewmh.c
@@ -188,11 +188,9 @@ ewmh_initclient(Client *c) {
void
ewmh_destroyclient(Client *c) {
- Ewmh *e;
ewmh_updateclientlist();
- e = &c->w.ewmh;
free(c->strut);
}
diff --git a/cmd/wmii/frame.c b/cmd/wmii/frame.c
@@ -96,10 +96,8 @@ frame_insert(Frame *f, Frame *pos) {
bool
frame_restack(Frame *f, Frame *above) {
- Client *c;
Area *a;
- c = f->client;
a = f->area;
if(!a->floating)
return false;
diff --git a/cmd/wmii/fs.c b/cmd/wmii/fs.c
@@ -523,7 +523,7 @@ fs_write(Ixp9Req *r) {
t->max);
else
goto done;
- ixp_respond(r, nil);
+ ixp_respond(r, errstr);
found++;
}
done:
diff --git a/cmd/wmii/key.c b/cmd/wmii/key.c
@@ -135,7 +135,7 @@ fake_keypress(ulong mod, KeyCode key) {
static Key *
match_keys(Key *k, ulong mod, KeyCode keycode, bool seq) {
Key *ret, *next;
- volatile int i; /* shut up ken */
+ int i; /* shut up ken */
ret = nil;
for(next = k->tnext; k; i = (k=next) && (next=k->tnext)) {
@@ -146,6 +146,7 @@ match_keys(Key *k, ulong mod, KeyCode keycode, bool seq) {
ret = k;
}
}
+ USED(i);
return ret;
}
diff --git a/cmd/wmii/layout.c b/cmd/wmii/layout.c
@@ -147,12 +147,9 @@ vplace(Framewin *fw, Point pt) {
Rectangle r;
Frame *f;
Area *a;
- View *v;
long l;
int hr;
- v = selview;
-
a = find_area(pt);
if(a == nil)
return;
@@ -200,11 +197,8 @@ done:
static void
hplace(Framewin *fw, Point pt) {
Area *a;
- View *v;
int minw;
- v = selview;
-
a = find_area(pt);
if(a == nil)
return; /* XXX: Multihead. */
diff --git a/cmd/wmii/stack.c b/cmd/wmii/stack.c
@@ -7,14 +7,12 @@
void
stack_scale(Frame *first, int height) {
Frame *f;
- Area *a;
uint dy;
int surplus;
- a = first->area;
-
/*
* Will need something like this.
+ a = first->area;
column_fit(a, &ncol, &nuncol);
*/