From d931bb5a0513784300830c098a92fd683ad7c09c Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=98yvind=20Harboe?= Date: Mon, 31 Oct 2011 22:03:49 +0100 Subject: [PATCH] str9x: explain compiler that a local variable will always be initialized MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Change-Id: I9ddb2793b4cdbf6acea6f69973531491e4ebcc5b Signed-off-by: Øyvind Harboe Reviewed-on: http://openocd.zylin.com/145 Tested-by: jenkins Reviewed-by: Spencer Oliver --- src/flash/nor/str9x.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/flash/nor/str9x.c b/src/flash/nor/str9x.c index 61a438fc9..63cfd18f7 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; -- 2.39.5