Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 3 Apr 2024 18:14:26 GMT
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: d627293f03c1 - main - ddb: Fix format string errors in db_pprint.c
Message-ID:  <202404031814.433IEQhD000441@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
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);
 }
 
 /*



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202404031814.433IEQhD000441>