diff options
author | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-04-19 08:16:58 +0000 |
---|---|---|
committer | oharboe <oharboe@b42882b7-edfa-0310-969c-e2dbd0fdcd60> | 2009-04-19 08:16:58 +0000 |
commit | a88532bc6061ccc74ca08de161ec6fecf88a85b0 (patch) | |
tree | 7a1b0d1cf802cb5ed794340519d7103ec6270cd7 /src/flash/stellaris.c | |
parent | 7d6b4b42f61debb058013c4179f29f7fa09d8548 (diff) | |
download | riscv-openocd-a88532bc6061ccc74ca08de161ec6fecf88a85b0.zip riscv-openocd-a88532bc6061ccc74ca08de161ec6fecf88a85b0.tar.gz riscv-openocd-a88532bc6061ccc74ca08de161ec6fecf88a85b0.tar.bz2 |
Zach Welch <zw@superlucidity.net> fix signed/unsigned comparisons
git-svn-id: svn://svn.berlios.de/openocd/trunk@1466 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/flash/stellaris.c')
-rw-r--r-- | src/flash/stellaris.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/flash/stellaris.c b/src/flash/stellaris.c index bf268b5..b13f894 100644 --- a/src/flash/stellaris.c +++ b/src/flash/stellaris.c @@ -570,12 +570,12 @@ static int stellaris_erase(struct flash_bank_s *bank, int first, int last) return ERROR_FLASH_OPERATION_FAILED; } - if ((first < 0) || (last < first) || (last >= stellaris_info->num_pages)) + if ((first < 0) || (last < first) || (last >= (int)stellaris_info->num_pages)) { return ERROR_FLASH_SECTOR_INVALID; } - if ((first == 0) && (last == (stellaris_info->num_pages-1))) + if ((first == 0) && (last == ((int)stellaris_info->num_pages-1))) { return stellaris_mass_erase(bank); } @@ -821,7 +821,7 @@ static int stellaris_write(struct flash_bank_s *bank, u8 *buffer, u32 offset, u3 u32 words_remaining = (count / 4); u32 bytes_remaining = (count & 0x00000003); u32 bytes_written = 0; - u32 retval; + int retval; if (bank->target->state != TARGET_HALTED) { |