From 5ba64265fbcf1e68cc79d5107473a70f9c29c607 Mon Sep 17 00:00:00 2001 From: pancake Date: Tue, 19 Sep 2023 21:50:31 +0200 Subject: [PATCH] Fix another 0x%d and lint it --- libr/bin/dwarf.c | 2 +- libr/bin/format/mach0/mach0.c | 2 +- sys/lint.sh | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/libr/bin/dwarf.c b/libr/bin/dwarf.c index 1a916e60a9..d24cd1b37f 100644 --- a/libr/bin/dwarf.c +++ b/libr/bin/dwarf.c @@ -1721,7 +1721,7 @@ static void print_attr_value(const RBinDwarfAttrValue *val, PrintfCallback print print ("0x%"PFMT64x, val->address); break; case DW_FORM_implicit_const: - print ("0x%"PFMT64d, val->uconstant); + print ("0x%"PFMT64x, val->uconstant); break; default: print ("Unknown attr value form %"PFMT64d"\n", val->attr_form); diff --git a/libr/bin/format/mach0/mach0.c b/libr/bin/format/mach0/mach0.c index 59dd2f4cfe..4ffcd349cb 100644 --- a/libr/bin/format/mach0/mach0.c +++ b/libr/bin/format/mach0/mach0.c @@ -2143,7 +2143,7 @@ static int init_items(struct MACH0_(obj_t) *mo) { // int kind = r_read_ble16 (db + i + 4 + 2, mo->big_endian); int len = r_read_ble16 (db + j + 4, mo->big_endian); ut64 va = offset_to_vaddr(mo, dw); - // eprintf ("# 0x%d -> 0x%x\n", dw, va); + // eprintf ("# 0x%x -> 0x%x\n", dw, va); // eprintf ("0x%x kind %d len %d\n", dw, kind, len); eprintf ("Cd 8 %d @ 0x%"PFMT64x"\n", len / 8, va); } diff --git a/sys/lint.sh b/sys/lint.sh index 533666ee37..8cb10fd56e 100755 --- a/sys/lint.sh +++ b/sys/lint.sh @@ -26,6 +26,7 @@ cd "$(dirname $0)"/.. # find calls without ( #(git grep -n -e '[a-z](' | grep -v static | grep -v _API | grep -v shlr | grep libr/core) && exit 1 # validated and ready to go lintings +(git grep -e '0x%"PFMT64d' -e '0x%d' libr | grep c:) && exit 1 (git grep -e 'R_MIN(' -e 'R_MAX(' libr | grep c:) && exit 1 (git grep -n 'cmp(' libr | grep -v R_API | grep -v static | grep c:) && exit 1 # (git grep -n 'len(' libr | grep -v R_API | grep -v static | grep c:) && exit 1