[PATCH v2 3/8] rawdev: fix calloc parameters
Hemant Agrawal
hemant.agrawal at nxp.com
Thu Jan 25 04:39:16 CET 2024
> gcc [1] generates warning [2] about calloc usage, because calloc parameter
> order is wrong, fixing it by replacing parameters.
>
> [1]
> gcc (GCC) 14.0.0 20240108 (experimental)
>
> [2]
> Compiling C object .../lib/librte_rawdev.a.p/rawdev_rte_rawdev.c.o
> ../lib/rawdev/rte_rawdev.c: In function ‘handle_dev_dump’:
> ../lib/rawdev/rte_rawdev.c:659:29:
> error: ‘calloc’ sizes specified with ‘sizeof’ in the earlier
> argument and not in the later argument
> [-Werror=calloc-transposed-args]
> 659 | buf = calloc(sizeof(char), RTE_TEL_MAX_SINGLE_STRING_LEN);
> | ^~~~
>
> Fixes: e915d404eb72 ("rawdev: support telemetry dump rawdev")
> Cc: stable at dpdk.org
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit at amd.com>
Reviewed-by: Hemant Agrawal <hemant.agrawal at nxp.com>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 9818 bytes
Desc: not available
URL: <http://mails.dpdk.org/archives/dev/attachments/20240125/0492be87/attachment.bin>
More information about the dev
mailing list