Browse Source

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>
tags/v0.6.0-rc1
Øyvind Harboe 12 years ago
committed by Spencer Oliver
parent
commit
d931bb5a05
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      src/flash/nor/str9x.c

+ 3
- 0
src/flash/nor/str9x.c 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;


Loading…
Cancel
Save