...
|
...
|
@@ -174,7 +174,7 @@ static inline operand_t readOperand(struct cli_bc_func *func, unsigned char *p,
|
174
|
174
|
if (!*ok)
|
175
|
175
|
return MAX_OP;
|
176
|
176
|
if (v >= numValues) {
|
177
|
|
- cli_errmsg("Operand index exceeds bounds: %u >= %u!\n", v, numValues);
|
|
177
|
+ cli_errmsg("Operand index exceeds bounds: %u >= %u!\n", (unsigned)v, (unsigned)numValues);
|
178
|
178
|
*ok = 0;
|
179
|
179
|
return MAX_OP;
|
180
|
180
|
}
|
...
|
...
|
@@ -507,7 +507,7 @@ static int parseBB(struct cli_bc *bc, unsigned func, unsigned bb, unsigned char
|
507
|
507
|
}
|
508
|
508
|
BB->insts[BB->numInsts++] = inst;
|
509
|
509
|
}
|
510
|
|
- if (bb == bc->funcs[func].numBB-1) {
|
|
510
|
+ if (bb+1 == bc->funcs[func].numBB) {
|
511
|
511
|
if (buffer[offset] != 'E') {
|
512
|
512
|
cli_errmsg("Missing basicblock terminator, got: %c\n", buffer[offset]);
|
513
|
513
|
return CL_EMALFDB;
|
...
|
...
|
@@ -598,9 +598,9 @@ void cli_bytecode_destroy(struct cli_bc *bc)
|
598
|
598
|
for (j=0;j<f->numBB;j++) {
|
599
|
599
|
struct cli_bc_bb *BB = &f->BB[j];
|
600
|
600
|
for(k=0;k<BB->numInsts;k++) {
|
601
|
|
- struct cli_bc_inst *i = &BB->insts[k];
|
602
|
|
- if (operand_counts[i->opcode] > 3)
|
603
|
|
- free(i->u.ops.ops);
|
|
601
|
+ struct cli_bc_inst *ii = &BB->insts[k];
|
|
602
|
+ if (operand_counts[ii->opcode] > 3)
|
|
603
|
+ free(ii->u.ops.ops);
|
604
|
604
|
}
|
605
|
605
|
}
|
606
|
606
|
free(f->BB);
|