Fix compiler warnings.

This commit is contained in:
Kris Maglione 2011-09-14 17:45:29 -04:00
parent 0d268397c5
commit b340936d27
9 changed files with 18 additions and 30 deletions

View File

@ -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);

View File

@ -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)

View File

@ -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);

View File

@ -188,11 +188,9 @@ ewmh_initclient(Client *c) {
void
ewmh_destroyclient(Client *c) {
Ewmh *e;
ewmh_updateclientlist();
e = &c->w.ewmh;
free(c->strut);
}

View File

@ -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;

View File

@ -523,7 +523,7 @@ fs_write(Ixp9Req *r) {
t->max);
else
goto done;
ixp_respond(r, nil);
ixp_respond(r, errstr);
found++;
}
done:

View File

@ -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;
}

View File

@ -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. */

View File

@ -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);
*/