diff options
author | Øyvind Harboe <oyvind.harboe@zylin.com> | 2011-10-31 22:03:49 +0100 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2011-11-07 20:33:17 +0000 |
commit | d931bb5a0513784300830c098a92fd683ad7c09c (patch) | |
tree | 44f39972f5a94cc664afe09b68bc4860227ce161 /src/flash/nor/str9x.c | |
parent | 00c864835149a96b431fc8f31dd89542d88fd383 (diff) |
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>
Diffstat (limited to 'src/flash/nor/str9x.c')
-rw-r--r-- | src/flash/nor/str9x.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/flash/nor/str9x.c b/src/flash/nor/str9x.c index 61a438fc..63cfd18f 100644 --- a/src/flash/nor/str9x.c +++ b/src/flash/nor/str9x.c @@ -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; |