* [PATCH iproute2-next] tc: gred: fix debug print
@ 2025-09-03 7:44 Andrea Claudi
0 siblings, 0 replies; only message in thread
From: Andrea Claudi @ 2025-09-03 7:44 UTC (permalink / raw)
To: netdev; +Cc: Stephen Hemminger, David Ahern
When build with -DDEBUG, tc build fails with:
q_gred.c: In function ‘init_gred’:
q_gred.c:53:17: error: passing argument 2 of ‘fprintf’ from incompatible pointer type [-Wincompatible-pointer-types]
53 | DPRINTF(stderr, "init_gred: invoked with %s\n", *argv);
| ^~~~~~~
| |
| FILE *
This is due to the DPRINTF macro call. Indeed DPRINTF is defined as a
two-args macro when -DDEBUG is used, while it uses 3 args in this call.
Fix it simply dropping the useless first arg.
Fixes: aba5acdfdb34 ("(Logical change 1.3)")
Signed-off-by: Andrea Claudi <aclaudi@redhat.com>
---
tc/q_gred.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/tc/q_gred.c b/tc/q_gred.c
index 84fc9124..95573218 100644
--- a/tc/q_gred.c
+++ b/tc/q_gred.c
@@ -50,7 +50,7 @@ static int init_gred(const struct qdisc_util *qu, int argc, char **argv,
opt.def_DP = MAX_DPs;
while (argc > 0) {
- DPRINTF(stderr, "init_gred: invoked with %s\n", *argv);
+ DPRINTF("init_gred: invoked with %s\n", *argv);
if (strcmp(*argv, "vqs") == 0 ||
strcmp(*argv, "DPs") == 0) {
NEXT_ARG();
--
2.51.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2025-09-03 7:45 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-03 7:44 [PATCH iproute2-next] tc: gred: fix debug print Andrea Claudi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).