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: [email protected]

Signed-off-by: Aarnav JP <[email protected]>
---
 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

Reply via email to