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))
|
if(!(e.flags & VtEntryActive))
|
||||||
continue;
|
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);
|
addr, i, e.tag, e.snap, e.score);
|
||||||
ep = epoch;
|
ep = epoch;
|
||||||
if(e.snap != 0){
|
if(e.snap != 0){
|
||||||
@@ -599,7 +599,7 @@ chkDir(Fsck *chk, char *name, Source *source, Source *meta)
|
|||||||
name, o);
|
name, o);
|
||||||
continue;
|
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);
|
source->offset, o, b->addr);
|
||||||
if(b->addr != NilBlock && getBit(chk->errmap, b->addr))
|
if(b->addr != NilBlock && getBit(chk->errmap, b->addr))
|
||||||
warn(chk, "previously reported error in block %ux is in %s",
|
warn(chk, "previously reported error in block %ux is in %s",
|
||||||
|
|||||||
@@ -58,8 +58,8 @@ allocreq(Reqpool *pool, ulong tag)
|
|||||||
Req*
|
Req*
|
||||||
lookupreq(Reqpool *pool, ulong tag)
|
lookupreq(Reqpool *pool, ulong tag)
|
||||||
{
|
{
|
||||||
if(chatty9p > 1)
|
if(chatty9p > 1)
|
||||||
fprint(2, "lookupreq %lud\n", tag);
|
fprint(2, "lookupreq %lud\n", tag);
|
||||||
return lookupkey(pool->map, tag);
|
return lookupkey(pool->map, tag);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -69,8 +69,8 @@ closereq(Req *r)
|
|||||||
if(r == nil)
|
if(r == nil)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(chatty9p > 1)
|
if(chatty9p > 1)
|
||||||
fprint(2, "closereq %p %ld\n", r, r->ref.ref);
|
fprint(2, "closereq %p %ld\n", r, r->ref.ref);
|
||||||
|
|
||||||
if(decref(&r->ref) == 0){
|
if(decref(&r->ref) == 0){
|
||||||
if(r->fid)
|
if(r->fid)
|
||||||
@@ -104,7 +104,7 @@ if(chatty9p > 1)
|
|||||||
Req*
|
Req*
|
||||||
removereq(Reqpool *pool, ulong tag)
|
removereq(Reqpool *pool, ulong tag)
|
||||||
{
|
{
|
||||||
if(chatty9p > 1)
|
if(chatty9p > 1)
|
||||||
fprint(2, "removereq %lud\n", tag);
|
fprint(2, "removereq %lud\n", tag);
|
||||||
return deletekey(pool->map, tag);
|
return deletekey(pool->map, tag);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -83,8 +83,8 @@ getreq(Srv *s)
|
|||||||
r->type = 0;
|
r->type = 0;
|
||||||
r->srv = s;
|
r->srv = s;
|
||||||
r->pool = nil;
|
r->pool = nil;
|
||||||
if(chatty9p)
|
if(chatty9p)
|
||||||
fprint(2, "<-%d- %F: dup tag\n", s->infd, &f);
|
fprint(2, "<-%d- %F: dup tag\n", s->infd, &f);
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -95,11 +95,12 @@ if(chatty9p)
|
|||||||
memset(&r->ofcall, 0, sizeof r->ofcall);
|
memset(&r->ofcall, 0, sizeof r->ofcall);
|
||||||
r->type = r->ifcall.type;
|
r->type = r->ifcall.type;
|
||||||
|
|
||||||
if(chatty9p)
|
if(chatty9p) {
|
||||||
if(r->error)
|
if(r->error)
|
||||||
fprint(2, "<-%d- %F: %s\n", s->infd, &r->ifcall, r->error);
|
fprint(2, "<-%d- %F: %s\n", s->infd, &r->ifcall, r->error);
|
||||||
else
|
else
|
||||||
fprint(2, "<-%d- %F\n", s->infd, &r->ifcall);
|
fprint(2, "<-%d- %F\n", s->infd, &r->ifcall);
|
||||||
|
}
|
||||||
|
|
||||||
return r;
|
return r;
|
||||||
}
|
}
|
||||||
@@ -798,8 +799,8 @@ respond(Req *r, char *error)
|
|||||||
if(srv->fake)
|
if(srv->fake)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
if(chatty9p)
|
if(chatty9p)
|
||||||
fprint(2, "-%d-> %F\n", srv->outfd, &r->ofcall);
|
fprint(2, "-%d-> %F\n", srv->outfd, &r->ofcall);
|
||||||
|
|
||||||
qlock(&srv->wlock);
|
qlock(&srv->wlock);
|
||||||
n = convS2M(&r->ofcall, srv->wbuf, srv->msize);
|
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;
|
int i, first, op, a, l, quantum, isstmt, linebase, linerange, opcodebase, nf;
|
||||||
char *files, *dirs, *s;
|
char *files, *dirs, *s;
|
||||||
DwarfBuf b;
|
DwarfBuf b;
|
||||||
|
uintptr bp;
|
||||||
DwarfSym sym;
|
DwarfSym sym;
|
||||||
State emit, cur, reset;
|
State emit, cur, reset;
|
||||||
uchar **f, **newf;
|
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.p = d->line.data + off;
|
||||||
b.ep = b.p + d->line.len;
|
b.ep = b.p + d->line.len;
|
||||||
b.addrsize = sym.b.addrsize; /* should i get this from somewhere else? */
|
b.addrsize = sym.b.addrsize; /* should i get this from somewhere else? */
|
||||||
|
bp = (uintptr)b.p;
|
||||||
|
|
||||||
len = dwarfget4(&b);
|
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");
|
fprint(2, "bad len\n");
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
@@ -89,7 +91,7 @@ dwarfpctoline(Dwarf *d, ulong pc, char **cdir, char **dir, char **file, ulong *l
|
|||||||
}
|
}
|
||||||
|
|
||||||
len = dwarfget4(&b);
|
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");
|
fprint(2, "another bad len\n");
|
||||||
goto bad;
|
goto bad;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -64,7 +64,8 @@ memdraw(Memimage *dst, Rectangle r, Memimage *src, Point p0, Memimage *mask, Poi
|
|||||||
mask = memopaque;
|
mask = memopaque;
|
||||||
|
|
||||||
if(mask->layer){
|
if(mask->layer){
|
||||||
if(drawdebug) iprint("mask->layer != nil\n");
|
if(drawdebug)
|
||||||
|
iprint("mask->layer != nil\n");
|
||||||
return; /* too hard, at least for now */
|
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(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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -91,7 +91,8 @@ sunrpcrequestthread(void *v)
|
|||||||
while((m = recvp(srv->crequest)) != nil){
|
while((m = recvp(srv->crequest)) != nil){
|
||||||
/* could look up in cache here? */
|
/* 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;
|
m->srv = srv;
|
||||||
p = m->data;
|
p = m->data;
|
||||||
ep = p+m->count;
|
ep = p+m->count;
|
||||||
|
|||||||
Reference in New Issue
Block a user