Commit d2d990cc authored by Dave Cheney's avatar Dave Cheney

cmd/5c, cmd/5g, cmd/5l: fix array indexing warning under Clang 3.1

This should be the last of them.

R=golang-dev, minux.ma, rsc
CC=golang-dev
https://golang.org/cl/6297043
parent 166dab69
......@@ -169,7 +169,7 @@ Dconv(Fmt *fp)
case D_SHIFT:
v = a->offset;
op = "<<>>->@>" + (((v>>5) & 3) << 1);
op = &"<<>>->@>"[(((v>>5) & 3) << 1)];
if(v & (1<<4))
sprint(str, "R%d%c%cR%d", v&15, op[0], op[1], (v>>8)&15);
else
......
......@@ -119,7 +119,7 @@ Dconv(Fmt *fp)
case D_SHIFT:
v = a->offset;
op = "<<>>->@>" + (((v>>5) & 3) << 1);
op = &"<<>>->@>"[(((v>>5) & 3) << 1)];
if(v & (1<<4))
sprint(str, "R%d%c%cR%d", v&15, op[0], op[1], (v>>8)&15);
else
......
......@@ -191,7 +191,7 @@ Dconv(Fmt *fp)
case D_SHIFT:
v = a->offset;
op = "<<>>->@>" + (((v>>5) & 3) << 1);
op = &"<<>>->@>"[(((v>>5) & 3) << 1)];
if(v & (1<<4))
snprint(str, sizeof str, "R%d%c%cR%d", v&15, op[0], op[1], (v>>8)&15);
else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment