X-Git-Url: https://review.openocd.org/gitweb?p=openocd.git;a=blobdiff_plain;f=src%2Ftarget%2Ftarget.c;h=70fd8f2b71c6a1b96092c0b0c5a190e1a0150f63;hp=f203913cc5d669ca67dcea1e435e807fffc01589;hb=a1777fc6493b4c1879ef133c565327212859d37c;hpb=75a37eb5b37386768327e9670acfedc7811d529f diff --git a/src/target/target.c b/src/target/target.c index f203913cc5..70fd8f2b71 100644 --- a/src/target/target.c +++ b/src/target/target.c @@ -1860,7 +1860,7 @@ COMMAND_HANDLER(handle_reg_command) { struct target *target; struct reg *reg = NULL; - int count = 0; + unsigned count = 0; char *value; LOG_DEBUG("-"); @@ -1875,7 +1875,7 @@ COMMAND_HANDLER(handle_reg_command) count = 0; while (cache) { - int i; + unsigned i; command_print(CMD_CTX, "===== %s", cache->name); @@ -1917,10 +1917,10 @@ COMMAND_HANDLER(handle_reg_command) count = 0; while (cache) { - int i; + unsigned i; for (i = 0; i < cache->num_regs; i++) { - if (count++ == (int)num) + if (count++ == num) { reg = &cache->reg_list[i]; break;