flash/stmqspi: fix build error with -Werror=maybe-uninitialized
using gcc 9.3 on ubuntu focal fossa with -Werror=maybe-uninitialized we get this error: /src/flash/nor/stmqspi.c: In function ‘read_flash_id’: /src/flash/nor/stmqspi.c:1948:6: error: ‘retval’ may be used uninitialized Change-Id: Ifd8ae60df847fc61e22ca100c008e3914c9af79b Signed-off-by: Tarek BOCHKATI <tarek.bouchkati@st.com> Reviewed-on: http://openocd.zylin.com/6012 Tested-by: jenkins Reviewed-by: Tarek BOCHKATI <tarek.bouchkati@gmail.com> Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com>
This commit is contained in:
parent
aaa6110d9b
commit
310c9800c7
|
@ -1945,7 +1945,7 @@ static int read_flash_id(struct flash_bank *bank, uint32_t *id1, uint32_t *id2)
|
|||
uint32_t io_base = stmqspi_info->io_base;
|
||||
uint8_t byte;
|
||||
unsigned int type, count, len1, len2;
|
||||
int retval;
|
||||
int retval = ERROR_OK;
|
||||
|
||||
/* invalidate both ids */
|
||||
*id1 = 0;
|
||||
|
|
Loading…
Reference in New Issue