git: d627293f03c1 - main - ddb: Fix format string errors in db_pprint.c
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Wed, 03 Apr 2024 18:14:26 UTC
The branch main has been updated by markj:
URL: https://cgit.FreeBSD.org/src/commit/?id=d627293f03c1b5908adc440f2008c02662b94cd5
commit d627293f03c1b5908adc440f2008c02662b94cd5
Author: Mark Johnston <markj@FreeBSD.org>
AuthorDate: 2024-04-03 18:12:45 +0000
Commit: Mark Johnston <markj@FreeBSD.org>
CommitDate: 2024-04-03 18:14:13 +0000
ddb: Fix format string errors in db_pprint.c
Reported by: bapt
Fixes: aada453dcbaa ("ddb: Properly pretty-print non-labeled enum values")
---
sys/ddb/db_pprint.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sys/ddb/db_pprint.c b/sys/ddb/db_pprint.c
index 8e6759a03220..10334ce650c8 100644
--- a/sys/ddb/db_pprint.c
+++ b/sys/ddb/db_pprint.c
@@ -226,13 +226,13 @@ db_pprint_enum(db_addr_t addr, struct ctf_type_v3 *type, u_int depth)
if (val == ep->cte_value) {
valname = db_ctf_stroff_to_str(&sym_data, ep->cte_name);
if (valname != NULL) {
- db_printf("%s (0x%lx)", valname, val);
+ db_printf("%s (0x%lx)", valname, (long)val);
break;
}
}
}
if (ep == endp)
- db_printf("0x%lx", val);
+ db_printf("0x%lx", (long)val);
}
/*