str9x: explain compiler that a local variable will always be initialized
Change-Id: I9ddb2793b4cdbf6acea6f69973531491e4ebcc5b Signed-off-by: Øyvind Harboe <oyvind.harboe@zylin.com> Reviewed-on: http://openocd.zylin.com/145 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This commit is contained in:
parent
00c8648351
commit
d931bb5a05
|
@ -280,6 +280,9 @@ static int str9x_erase(struct flash_bank *bank, int first, int last)
|
|||
total_timeout = 1000;
|
||||
}
|
||||
|
||||
/* this is so the compiler can *know* */
|
||||
assert(total_timeout > 0);
|
||||
|
||||
for (i = first; i <= last; i++)
|
||||
{
|
||||
int retval;
|
||||
|
|
Loading…
Reference in New Issue