X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fflash%2Fnor%2Fstr9x.c;h=63cfd18f70f511299d77915d8ae1cc135b79e3d1;hb=d931bb5a0513784300830c098a92fd683ad7c09c;hp=61a438fc96dbf7e72f6c89485e9ac58f161c555a;hpb=00c864835149a96b431fc8f31dd89542d88fd383;p=fw%2Fopenocd 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;