]> git.sur5r.net Git - openocd/commitdiff
Avoid 'may be used uninitialized' warning from FreeBSD base GCC
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 0400dd74de5995f6df41034e9c10cf04c1490679..b30a2d93b9ad5860ab9b1c895818f0d7c0c2b4f1 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) {