This is an automated email from Gerrit.

"Daniel Anselmi <danse...@gmx.ch>" just uploaded a new patch set to Gerrit, 
which you can find at https://review.openocd.org/c/openocd/+/9014

-- gerrit

commit 047a10d327b932295186ae85bbb3de54ba63a367
Author: Daniel Anselmi <danse...@gmx.ch>
Date:   Mon Aug 18 23:17:09 2025 +0200

    flash/nor/max32: fix: call to calloc
    
    With 15.2.1 we get the following error:
    'calloc' sizes specified with 'sizeof' in the earlier argument and
    not in the later argument.
    
    Change-Id: Ib34d758bc09d34d86d29dd02ea9c7f05b1e83327
    Signed-off-by: Daniel Anselmi <danse...@gmx.ch>

diff --git a/src/flash/nor/max32xxx.c b/src/flash/nor/max32xxx.c
index ed6083441d..e91b9b67d5 100644
--- a/src/flash/nor/max32xxx.c
+++ b/src/flash/nor/max32xxx.c
@@ -113,7 +113,7 @@ FLASH_BANK_COMMAND_HANDLER(max32xxx_flash_bank_command)
                return ERROR_FLASH_BANK_INVALID;
        }
 
-       info = calloc(sizeof(struct max32xxx_flash_bank), 1);
+       info = calloc(1, sizeof(struct max32xxx_flash_bank));
        COMMAND_PARSE_NUMBER(u32, CMD_ARGV[2], info->flash_size);
        COMMAND_PARSE_NUMBER(u32, CMD_ARGV[6], info->flc_base);
        COMMAND_PARSE_NUMBER(u32, CMD_ARGV[7], info->sector_size);

-- 

Reply via email to