This is an automated email from Gerrit.

"Sevan Janiyan <ventur...@geeklan.co.uk>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/8123

-- gerrit

commit 42d6e1b9644e6436d252652e22b1cbf4256e236e
Author: Sevan Janiyan <ventur...@geeklan.co.uk>
Date:   Sun Jan 28 20:34:41 2024 +0000

    src/flash/nor/xcf.c: Prefix hexadecimal numbers
    
    Allows to be compiled with older compilers where the hex number are
    treated as integers otherwise & the build fails.
    src/flash/nor/xcf.c:133:46: error: invalid suffix "b01" on integer constant
    src/flash/nor/xcf.c:134:46: error: invalid suffix "b01" on integer constant
    src/flash/nor/xcf.c:531:10: error: invalid suffix "b1111" on integer 
constant
    
    Change-Id: I742d3a8a86bf16f81421d11c59d3cb155ee17aed
    Signed-off-by: Sevan Janiyan <ventur...@geeklan.co.uk>

diff --git a/src/flash/nor/xcf.c b/src/flash/nor/xcf.c
index c253b2264b..206a3ab163 100644
--- a/src/flash/nor/xcf.c
+++ b/src/flash/nor/xcf.c
@@ -130,8 +130,8 @@ static struct xcf_status read_status(struct flash_bank 
*bank)
        jtag_add_ir_scan(bank->target->tap, &scan, TAP_IDLE);
        jtag_execute_queue();
 
-       ret.isc_error   = ((irdata[0] >> 7) & 3) == 0b01;
-       ret.prog_error  = ((irdata[0] >> 5) & 3) == 0b01;
+       ret.isc_error   = ((irdata[0] >> 7) & 3) == 0x0b01;
+       ret.prog_error  = ((irdata[0] >> 5) & 3) == 0x0b01;
        ret.prog_busy   = ((irdata[0] >> 4) & 1) == 0;
        ret.isc_mode    = ((irdata[0] >> 3) & 1) == 1;
 
@@ -528,7 +528,7 @@ static int isc_program_single_revision_btc(struct 
flash_bank *bank)
 {
        uint8_t buf[4];
        uint32_t btc = 0xFFFFFFFF;
-       btc &= ~0b1111;
+       btc &= ~0x0b1111;
        btc |= ((bank->num_sectors - 1) << 2);
        btc &= ~(1 << 4);
        h_u32_to_le(buf, btc);

-- 

Reply via email to