@@ -20,7 +20,7 @@ int riscv_program_init(struct riscv_program *p, struct target *target)
20
20
p -> target = target ;
21
21
p -> instruction_count = 0 ;
22
22
23
- for (size_t i = 0 ; i < RISCV_MAX_PROGBUF_SIZE ; ++ i )
23
+ for (unsigned int i = 0 ; i < RISCV013_MAX_PROGBUF_SIZE ; ++ i )
24
24
p -> progbuf [i ] = (uint32_t )(-1 );
25
25
26
26
p -> execution_result = RISCV_PROGBUF_EXEC_RESULT_NOT_EXECUTED ;
@@ -47,9 +47,9 @@ int riscv_program_exec(struct riscv_program *p, struct target *t)
47
47
48
48
if (riscv_program_ebreak (p ) != ERROR_OK ) {
49
49
LOG_TARGET_ERROR (t , "Unable to insert ebreak into program buffer" );
50
- for (size_t i = 0 ; i < riscv_progbuf_size (p -> target ); ++ i )
50
+ for (unsigned int i = 0 ; i < riscv_progbuf_size (p -> target ); ++ i )
51
51
LOG_TARGET_ERROR (t , "progbuf[%02x]: DASM(0x%08" PRIx32 ") [0x%08" PRIx32 "]" ,
52
- ( int ) i , p -> progbuf [i ], p -> progbuf [i ]);
52
+ i , p -> progbuf [i ], p -> progbuf [i ]);
53
53
return ERROR_FAIL ;
54
54
}
55
55
@@ -198,8 +198,8 @@ int riscv_program_insert(struct riscv_program *p, riscv_insn_t i)
198
198
{
199
199
if (p -> instruction_count >= riscv_progbuf_size (p -> target )) {
200
200
LOG_TARGET_ERROR (p -> target , "Unable to insert program into progbuf, "
201
- "capacity would be exceeded (progbufsize=%d )." ,
202
- ( int ) riscv_progbuf_size (p -> target ));
201
+ "capacity would be exceeded (progbufsize=%u )." ,
202
+ riscv_progbuf_size (p -> target ));
203
203
return ERROR_FAIL ;
204
204
}
205
205
0 commit comments