[PATCH 2/2] examples/ptpclient: fix format specifier for port ID
David Marchand
david.marchand at redhat.com
Fri Mar 27 09:01:11 CET 2026
On Fri, 27 Mar 2026 at 05:16, Aarnav JP <ajp at marvell.com> wrote:
>
> portid is uint16_t, use PRIu16 instead of PRIu8 to fix
> format specifier mismatch warning with GCC 15.
>
> ../examples/ptpclient/ptpclient.c: In function 'main':
> ../examples/ptpclient/ptpclient.c:797:30:
> warning: format '%hhu' expects argument of type 'unsigned char',
> but argument 3 has type 'uint16_t' [-Wformat=]
> 797 | "Cannot init port %"PRIu8 "\n",
> | ^
>
> Fixes: ab129e9065a5 ("examples/ptpclient: add minimal PTP client")
Same as previous comment, at the time this code was introduced,
port_id was a uint8_t.
This can be fixed when applying:
Fixes: 47523597ff6c ("examples: fix port id type")
> Cc: stable at dpdk.org
>
> Signed-off-by: Aarnav JP <ajp at marvell.com>
Reviewed-by: David Marchand <david.marchand at redhat.com>
--
David Marchand
More information about the dev
mailing list