Avoid 'may be used uninitialized' warning from FreeBSD base GCC 35/1835/2
authorEd Maste <emaste@freebsd.org>
Wed, 18 Dec 2013 16:18:14 +0000 (11:18 -0500)
committerSpencer Oliver <spen@spen-soft.co.uk>
Sun, 22 Dec 2013 20:22:50 +0000 (20:22 +0000)
Change-Id: Ice2472bf7a467652485a5a8c36880c6a47d64c6c
Signed-off-by: Ed Maste <emaste@freebsd.org>
Reviewed-on: http://openocd.zylin.com/1835
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
src/flash/nor/lpcspifi.c

index 0400dd7..b30a2d9 100644 (file)
@@ -774,7 +774,7 @@ static int lpcspifi_read_flash_id(struct flash_bank *bank, uint32_t *id)
        uint32_t ssp_base = lpcspifi_info->ssp_base;
        uint32_t io_base = lpcspifi_info->io_base;
        uint32_t value;
-       uint8_t id_buf[3];
+       uint8_t id_buf[3] = {0, 0, 0};
        int retval;
 
        if (target->state != TARGET_HALTED) {