]> git.sur5r.net Git - openocd/commit
FLASH/CFI: fix clang warnings
authorAntonio Borneo <borneo.antonio@gmail.com>
Sun, 23 Oct 2011 03:21:44 +0000 (11:21 +0800)
committerØyvind Harboe <oyvindharboe@gmail.com>
Sun, 23 Oct 2011 14:16:45 +0000 (14:16 +0000)
commit343204927656561dd3deec52c58c13ef2de4f60b
treeee16cda7cf35767ecc4740a94889246586e481ab
parent9bb3a05f0e53ca824ccfb5828c8c9399e375de8b
FLASH/CFI: fix clang warnings

Total of 5 warnings:
3x "Dead store": removed dead assignment to variable;
1x "Dereference of null pointer": this is not an error, but a
   limited visibility of clang, since pointer erase_region_info
   is initialized inside cfi_fixup_non_cfi();
1x "Branch condition evaluates to a garbage value":
   this is a real coding bug that could issue SIGSEGV, since
   "goto cleanup" can be executed before initialization
   of "source".

Change-Id: Id3c323c82bb15cbd3bb8fc04b23541f11145f109
Signed-off-by: Antonio Borneo <borneo.antonio@gmail.com>
Reviewed-on: http://openocd.zylin.com/84
Tested-by: jenkins
Reviewed-by: Øyvind Harboe <oyvindharboe@gmail.com>
src/flash/nor/cfi.c