From: Aarnav JP <ajp@marvell.com>
To: <dev@dpdk.org>, Kirill Rybalchenko <kirill.rybalchenko@intel.com>,
"Pablo de Lara" <pablo.de.lara.guarch@intel.com>,
John McNamara <john.mcnamara@intel.com>,
Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Cc: <jerinj@marvell.com>, <ndabilpuram@marvell.com>,
<rbhansali@marvell.com>, Aarnav JP <ajp@marvell.com>,
<stable@dpdk.org>
Subject: [PATCH 2/2] examples/ptpclient: fix format specifier for port ID
Date: Fri, 27 Mar 2026 09:45:17 +0530 [thread overview]
Message-ID: <20260327041517.812223-2-ajp@marvell.com> (raw)
In-Reply-To: <20260327041517.812223-1-ajp@marvell.com>
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")
Cc: stable@dpdk.org
Signed-off-by: Aarnav JP <ajp@marvell.com>
---
examples/ptpclient/ptpclient.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/examples/ptpclient/ptpclient.c b/examples/ptpclient/ptpclient.c
index c344e7db1e..1fec4af767 100644
--- a/examples/ptpclient/ptpclient.c
+++ b/examples/ptpclient/ptpclient.c
@@ -794,7 +794,7 @@ main(int argc, char *argv[])
ptp_enabled_port_nb++;
} else {
rte_exit(EXIT_FAILURE,
- "Cannot init port %"PRIu8 "\n",
+ "Cannot init port %"PRIu16 "\n",
portid);
}
} else
--
2.43.0
next prev parent reply other threads:[~2026-03-27 4:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-27 4:15 [PATCH 1/2] examples/packet_ordering: fix format specifier for port ID Aarnav JP
2026-03-27 4:15 ` Aarnav JP [this message]
2026-03-27 8:01 ` [PATCH 2/2] examples/ptpclient: " David Marchand
2026-03-27 8:08 ` David Marchand
2026-03-27 7:43 ` [PATCH 1/2] examples/packet_ordering: " David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260327041517.812223-2-ajp@marvell.com \
--to=ajp@marvell.com \
--cc=danielx.t.mrzyglod@intel.com \
--cc=dev@dpdk.org \
--cc=jerinj@marvell.com \
--cc=john.mcnamara@intel.com \
--cc=kirill.rybalchenko@intel.com \
--cc=ndabilpuram@marvell.com \
--cc=pablo.de.lara.guarch@intel.com \
--cc=rbhansali@marvell.com \
--cc=stable@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox