two instances of warning: cannot optimize loop, the loop counter may overflow [-Wunsafe-loop-optimizations] Signed-off-by: Ben Widawsky <ben@xxxxxxxxxxxx> --- intel/intel_decode.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/intel/intel_decode.c b/intel/intel_decode.c index c9bfee4..ae0bd27 100644 --- a/intel/intel_decode.c +++ b/intel/intel_decode.c @@ -2488,7 +2488,7 @@ decode_3d_primitive(struct drm_intel_decode *ctx) goto out; } else { /* fixed size vertex index buffer */ - for (j = 1, i = 0; i < len; i += 2, j++) { + for (j = 1, i = 0; i < len && j; i += 2, j++) { if (i * 2 == len - 1) { instr_out(ctx, j, " indices: 0x%04x\n", @@ -3117,7 +3117,8 @@ decode_3d_965(struct drm_intel_decode *ctx) { uint32_t opcode; unsigned int len; - unsigned int i, j, sba_len; + unsigned int j, sba_len; + unsigned short i; const char *desc1 = NULL; uint32_t *data = ctx->data; uint32_t devid = ctx->devid; -- 1.7.11 _______________________________________________ dri-devel mailing list dri-devel@xxxxxxxxxxxxxxxxxxxxx http://lists.freedesktop.org/mailman/listinfo/dri-devel