On Thu, 6 May 2021 00:51:33 +0300
Dmitry Kozlyuk <[email protected]> wrote:
> This fixes -Wformat warning with clang 10.0.0 on Windows.
>
> Fixes: f8244c6399d9 ("ethdev: increase port id range")
> Cc: [email protected]
>
> Signed-off-by: Dmitry Kozlyuk <[email protected]>
> Acked-by: Tyler Retzlaff <[email protected]>
> ---
> v2: use PRIx16 instead of %u and a cast (Tyler, Thomas).
>
> examples/rxtx_callbacks/main.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/examples/rxtx_callbacks/main.c b/examples/rxtx_callbacks/main.c
> index b57b2fc6bc..ecc2da2d8c 100644
> --- a/examples/rxtx_callbacks/main.c
> +++ b/examples/rxtx_callbacks/main.c
> @@ -329,7 +329,7 @@ main(int argc, char *argv[])
> /* initialize all ports */
> RTE_ETH_FOREACH_DEV(portid)
> if (port_init(portid, mbuf_pool) != 0)
> - rte_exit(EXIT_FAILURE, "Cannot init port %"PRIu8"\n",
> + rte_exit(EXIT_FAILURE, "Cannot init port %"PRIx16"\n",
> portid);
>
> if (rte_lcore_count() > 1)
NAK
Just use %u it works for uint16. Don't start using hex, no other places in
DPDK print port number in hex.