[PATCH 1/2] examples/packet_ordering: fix format specifier for port ID

Aarnav JP ajp at marvell.com
Fri Mar 27 05:15:16 CET 2026


port_id is uint16_t, use PRIu16 instead of PRIu8 to fix
format specifier mismatch warning with GCC 15.

../examples/packet_ordering/main.c: In function 'main':
../examples/packet_ordering/main.c:740:46:
warning: format '%hhu' expects argument of type 'unsigned char',
but argument 3 has type 'uint16_t' [-Wformat=]
  740 |   rte_exit(EXIT_FAILURE, "Cannot initialize port %"PRIu8"\n",
      |                                                     ^

Fixes: 850f3733f840 ("examples/packet_ordering: new sample app")
Cc: stable at dpdk.org

Signed-off-by: Aarnav JP <ajp at marvell.com>
---
 examples/packet_ordering/main.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/packet_ordering/main.c b/examples/packet_ordering/main.c
index 5ffdf72d71..748fe0826a 100644
--- a/examples/packet_ordering/main.c
+++ b/examples/packet_ordering/main.c
@@ -737,7 +737,7 @@ main(int argc, char **argv)
 		printf("Initializing port %u... done\n", port_id);
 
 		if (configure_eth_port(port_id) != 0)
-			rte_exit(EXIT_FAILURE, "Cannot initialize port %"PRIu8"\n",
+			rte_exit(EXIT_FAILURE, "Cannot initialize port %"PRIu16"\n",
 					port_id);
 	}
 
-- 
2.43.0



More information about the dev mailing list