This is an automated email from Gerrit.

Tarek BOCHKATI ([email protected]) just uploaded a new patch set to 
Gerrit, which you can find at http://openocd.zylin.com/6012

-- gerrit

commit 1ebad85902741f3e004084dcedf24bd41604f1f9
Author: Tarek BOCHKATI <[email protected]>
Date:   Mon Jan 11 19:21:06 2021 +0100

    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 <[email protected]>

diff --git a/src/flash/nor/stmqspi.c b/src/flash/nor/stmqspi.c
index f54e497..a013336 100644
--- a/src/flash/nor/stmqspi.c
+++ b/src/flash/nor/stmqspi.c
@@ -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;

-- 


_______________________________________________
OpenOCD-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/openocd-devel

Reply via email to