fix GCC's -Wcalloc-transposed-args warning
GCC 14.1.0 warns about calls to `calloc()` with element size as the first argument. Link: https://gcc.gnu.org/onlinedocs/gcc-14.1.0/gcc/Warning-Options.html#index-Wcalloc-transposed-args Change-Id: I7d44a74a003ee6ec49d165f91727972478214587 Signed-off-by: Evgeniy Naydanov <evgeniy.naydanov@syntacore.com> Reviewed-on: https://review.openocd.org/c/openocd/+/8301 Tested-by: jenkins Reviewed-by: Antonio Borneo <borneo.antonio@gmail.com> Reviewed-by: Tomas Vanek <vanekt@fbl.cz>
This commit is contained in:
committed by
Antonio Borneo
parent
e4c0904731
commit
400cf213c0
@@ -937,7 +937,7 @@ static int msp432_probe(struct flash_bank *bank)
|
||||
|
||||
if (is_main && MSP432P4 == msp432_bank->family_type) {
|
||||
/* Create the info flash bank needed by MSP432P4 variants */
|
||||
struct flash_bank *info = calloc(sizeof(struct flash_bank), 1);
|
||||
struct flash_bank *info = calloc(1, sizeof(struct flash_bank));
|
||||
if (!info)
|
||||
return ERROR_FAIL;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user