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:
@@ -95,11 +95,12 @@ if(chatty9p)
|
||||
memset(&r->ofcall, 0, sizeof r->ofcall);
|
||||
r->type = r->ifcall.type;
|
||||
|
||||
if(chatty9p)
|
||||
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;
|
||||
}
|
||||
|
||||
@@ -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