all: clean up misleading indentation warnings
Misleading indentation warnings are actually useful, as they will occasionally reveal actual bugs (cf the apple `goto fail` security bug from a few years ago). Newer versions of clang (at least) are more aggressive about warnings in this regard, which has exposed a few warnings that are annoying. However, they are easy to address.
This commit is contained in:
@@ -293,7 +293,7 @@ walkEpoch(Fsck *chk, Block *b, uchar score[VtScoreSize], int type, u32int tag,
|
||||
}
|
||||
if(!(e.flags & VtEntryActive))
|
||||
continue;
|
||||
if(0) fprint(2, "%x[%d] tag=%x snap=%d score=%V\n",
|
||||
if(0)fprint(2, "%x[%d] tag=%x snap=%d score=%V\n",
|
||||
addr, i, e.tag, e.snap, e.score);
|
||||
ep = epoch;
|
||||
if(e.snap != 0){
|
||||
@@ -599,7 +599,7 @@ chkDir(Fsck *chk, char *name, Source *source, Source *meta)
|
||||
name, o);
|
||||
continue;
|
||||
}
|
||||
if(0) fprint(2, "source %V:%d block %d addr %d\n", source->score,
|
||||
if(0)fprint(2, "source %V:%d block %d addr %d\n", source->score,
|
||||
source->offset, o, b->addr);
|
||||
if(b->addr != NilBlock && getBit(chk->errmap, b->addr))
|
||||
warn(chk, "previously reported error in block %ux is in %s",
|
||||
|
||||
@@ -58,8 +58,8 @@ allocreq(Reqpool *pool, ulong tag)
|
||||
Req*
|
||||
lookupreq(Reqpool *pool, ulong tag)
|
||||
{
|
||||
if(chatty9p > 1)
|
||||
fprint(2, "lookupreq %lud\n", tag);
|
||||
if(chatty9p > 1)
|
||||
fprint(2, "lookupreq %lud\n", tag);
|
||||
return lookupkey(pool->map, tag);
|
||||
}
|
||||
|
||||
@@ -69,8 +69,8 @@ closereq(Req *r)
|
||||
if(r == nil)
|
||||
return;
|
||||
|
||||
if(chatty9p > 1)
|
||||
fprint(2, "closereq %p %ld\n", r, r->ref.ref);
|
||||
if(chatty9p > 1)
|
||||
fprint(2, "closereq %p %ld\n", r, r->ref.ref);
|
||||
|
||||
if(decref(&r->ref) == 0){
|
||||
if(r->fid)
|
||||
@@ -104,7 +104,7 @@ if(chatty9p > 1)
|
||||
Req*
|
||||
removereq(Reqpool *pool, ulong tag)
|
||||
{
|
||||
if(chatty9p > 1)
|
||||
fprint(2, "removereq %lud\n", tag);
|
||||
if(chatty9p > 1)
|
||||
fprint(2, "removereq %lud\n", tag);
|
||||
return deletekey(pool->map, tag);
|
||||
}
|
||||
|
||||
@@ -83,8 +83,8 @@ getreq(Srv *s)
|
||||
r->type = 0;
|
||||
r->srv = s;
|
||||
r->pool = nil;
|
||||
if(chatty9p)
|
||||
fprint(2, "<-%d- %F: dup tag\n", s->infd, &f);
|
||||
if(chatty9p)
|
||||
fprint(2, "<-%d- %F: dup tag\n", s->infd, &f);
|
||||
return r;
|
||||
}
|
||||
|
||||
@@ -95,11 +95,12 @@ if(chatty9p)
|
||||
memset(&r->ofcall, 0, sizeof r->ofcall);
|
||||
r->type = r->ifcall.type;
|
||||
|
||||
if(chatty9p)
|
||||
if(r->error)
|
||||
fprint(2, "<-%d- %F: %s\n", s->infd, &r->ifcall, r->error);
|
||||
else
|
||||
fprint(2, "<-%d- %F\n", s->infd, &r->ifcall);
|
||||
if(chatty9p) {
|
||||
if(r->error)
|
||||
fprint(2, "<-%d- %F: %s\n", s->infd, &r->ifcall, r->error);
|
||||
else
|
||||
fprint(2, "<-%d- %F\n", s->infd, &r->ifcall);
|
||||
}
|
||||
|
||||
return r;
|
||||
}
|
||||
@@ -798,8 +799,8 @@ respond(Req *r, char *error)
|
||||
if(srv->fake)
|
||||
return;
|
||||
|
||||
if(chatty9p)
|
||||
fprint(2, "-%d-> %F\n", srv->outfd, &r->ofcall);
|
||||
if(chatty9p)
|
||||
fprint(2, "-%d-> %F\n", srv->outfd, &r->ofcall);
|
||||
|
||||
qlock(&srv->wlock);
|
||||
n = convS2M(&r->ofcall, srv->wbuf, srv->msize);
|
||||
|
||||
@@ -47,6 +47,7 @@ dwarfpctoline(Dwarf *d, ulong pc, char **cdir, char **dir, char **file, ulong *l
|
||||
int i, first, op, a, l, quantum, isstmt, linebase, linerange, opcodebase, nf;
|
||||
char *files, *dirs, *s;
|
||||
DwarfBuf b;
|
||||
uintptr bp;
|
||||
DwarfSym sym;
|
||||
State emit, cur, reset;
|
||||
uchar **f, **newf;
|
||||
@@ -74,9 +75,10 @@ dwarfpctoline(Dwarf *d, ulong pc, char **cdir, char **dir, char **file, ulong *l
|
||||
b.p = d->line.data + off;
|
||||
b.ep = b.p + d->line.len;
|
||||
b.addrsize = sym.b.addrsize; /* should i get this from somewhere else? */
|
||||
bp = (uintptr)b.p;
|
||||
|
||||
len = dwarfget4(&b);
|
||||
if(b.p==nil || b.p+len > b.ep || b.p+len < b.p){
|
||||
if(b.p==nil || b.p+len > b.ep || bp+len < bp){
|
||||
fprint(2, "bad len\n");
|
||||
goto bad;
|
||||
}
|
||||
@@ -89,7 +91,7 @@ dwarfpctoline(Dwarf *d, ulong pc, char **cdir, char **dir, char **file, ulong *l
|
||||
}
|
||||
|
||||
len = dwarfget4(&b);
|
||||
if(b.p==nil || b.p+len > b.ep || b.p+len < b.p){
|
||||
if(b.p==nil || b.p+len > b.ep || bp+len < bp){
|
||||
fprint(2, "another bad len\n");
|
||||
goto bad;
|
||||
}
|
||||
|
||||
@@ -64,7 +64,8 @@ memdraw(Memimage *dst, Rectangle r, Memimage *src, Point p0, Memimage *mask, Poi
|
||||
mask = memopaque;
|
||||
|
||||
if(mask->layer){
|
||||
if(drawdebug) iprint("mask->layer != nil\n");
|
||||
if(drawdebug)
|
||||
iprint("mask->layer != nil\n");
|
||||
return; /* too hard, at least for now */
|
||||
}
|
||||
|
||||
@@ -75,7 +76,8 @@ if(drawdebug) iprint("mask->layer != nil\n");
|
||||
}
|
||||
|
||||
if(drawclip(dst, &r, src, &p0, mask, &p1, &srcr, &mr) == 0){
|
||||
if(drawdebug) iprint("drawclip dstcr %R srccr %R maskcr %R\n", dst->clipr, src->clipr, mask->clipr);
|
||||
if(drawdebug)
|
||||
iprint("drawclip dstcr %R srccr %R maskcr %R\n", dst->clipr, src->clipr, mask->clipr);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,8 @@ sunrpcrequestthread(void *v)
|
||||
while((m = recvp(srv->crequest)) != nil){
|
||||
/* could look up in cache here? */
|
||||
|
||||
if(srv->chatty) fprint(2, "sun msg %p count %d\n", m, m->count);
|
||||
if(srv->chatty)
|
||||
fprint(2, "sun msg %p count %d\n", m, m->count);
|
||||
m->srv = srv;
|
||||
p = m->data;
|
||||
ep = p+m->count;
|
||||
|
||||
Reference in New Issue
Block a user