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:
Øyvind Harboe 2011-10-31 22:03:49 +01:00 committed by Spencer Oliver
parent 00c8648351
commit d931bb5a05
1 changed files with 3 additions and 0 deletions

View File

@ -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;