FLASH_BANK_COMMAND_HANDLER(cfi_flash_bank_command)
{
cfi_flash_bank_t *cfi_info;
- int i;
- (void) cmd_ctx;
- (void) cmd;
if (argc < 6)
{
cfi_info->jedec_probe = 0;
cfi_info->not_cfi = 0;
- for (i = 6; i < argc; i++)
+ for (unsigned i = 6; i < argc; i++)
{
if (strcmp(args[i], "x16_as_x8") == 0)
{
if (argc > 3)
{
- int i;
- for (i = 3; i < argc; i++)
+ for (unsigned i = 3; i < argc; i++)
{
if (!strcmp(args[i], "oob_raw"))
oob_format |= NAND_OOB_RAW;
if (argc > 4)
{
- int i;
- for (i = 4; i < argc; i++)
+ for (unsigned i = 4; i < argc; i++)
{
if (!strcmp(args[i], "oob_raw"))
oob_format |= NAND_OOB_RAW;
*/
#define __COMMAND_HANDLER(name, extra...) \
int name(struct command_context_s *cmd_ctx, \
- char *cmd, char **args, int argc, ##extra)
+ char *cmd, char **args, unsigned argc, ##extra)
/**
* Use this to macro to call a command helper (or a nested handler).
config_file = fopen(args[0], "a");
if (config_file != NULL)
{
- int i;
fseek(config_file, 0, SEEK_END);
+ unsigned i;
for (i = 1; i < argc; i++)
{
if (fwrite(args[i], 1, strlen(args[i]), config_file) != strlen(args[i]))
argc -= 1;
}
- int i;
- int retval = ERROR_OK;
+ unsigned i;
for (i = 0; i < argc; i += 2)
{
COMMAND_PARSE_NUMBER(u16, args[i], ft2232_vid[i >> 1]);
*/
ft2232_vid[i >> 1] = ft2232_pid[i >> 1] = 0;
- return retval;
+ return ERROR_OK;
}
COMMAND_HANDLER(ft2232_handle_latency_command)
COMMAND_HANDLER(handle_svf_command)
{
#define SVF_NUM_OF_OPTIONS 1
- int command_num = 0, i;
+ int command_num = 0;
int ret = ERROR_OK;
long long time_ago;
// parse variant
svf_quiet = 0;
- for (i = 1; i < argc; i++)
+ for (unsigned i = 1; i < argc; i++)
{
if (!strcmp(args[i], "quiet"))
{
struct arm7_9_common_s *arm7_9 = target_to_arm7_9(target);
reg_t *vector_catch;
uint32_t vector_catch_value;
- int i, j;
/* it's uncommon, but some ARM7 chips can support this */
if (arm7_9->common_magic != ARM7_9_COMMON_MAGIC
}
else
{
- for (i = 0; i < argc; i++)
+ for (unsigned i = 0; i < argc; i++)
{
/* go through list of vectors */
+ unsigned j;
for (j = 0; arm9tdmi_vectors[j].name; j++)
{
if (strcmp(args[i], arm9tdmi_vectors[j].name) == 0)
}
/* output current settings */
- for (i = 0; arm9tdmi_vectors[i].name; i++) {
+ for (unsigned i = 0; arm9tdmi_vectors[i].name; i++) {
command_print(cmd_ctx, "%s: %s", arm9tdmi_vectors[i].name,
(vector_catch_value & arm9tdmi_vectors[i].value)
? "catch" : "don't catch");