git: 9f1beeaed4d5 - main - pfctl: fix superblock printf format mismatch
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 06 Mar 2023 19:26:57 UTC
The branch main has been updated by kp: URL: https://cgit.FreeBSD.org/src/commit/?id=9f1beeaed4d5490e76f1eca2fc68c725a933ec7f commit 9f1beeaed4d5490e76f1eca2fc68c725a933ec7f Author: Kajetan Staszkiewicz <vegeta@tuxpowered.net> AuthorDate: 2023-03-06 07:08:41 +0000 Commit: Kristof Provost <kp@FreeBSD.org> CommitDate: 2023-03-06 18:22:35 +0000 pfctl: fix superblock printf format mismatch It is impossible to compile pfctl with OPT_DEBUG due to integer width mismatch: /usr/home/kajetan.staszkiewicz/freebsd.git/sbin/pfctl/pfctl_optimize.c:1479:9: error: format specifies type 'unsigned int' but the argument has type 'unsigned long' [-Werror,-Wformat] i - pf_rule_desc[closest].prf_off--- pfctl_optimize.o --- ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/home/kajetan.staszkiewicz/freebsd.git/sbin/pfctl/pfctl_optimize.c:52:44: note: expanded from macro 'DEBUG' printf("%s: " str "\n", __FUNCTION__ , ## v) ~~~ ^ 1 error generated. Reviewed by: kp Obtained from: OpenBSD (pfctl_optimize.c 1.15) Differential Revision: https://reviews.freebsd.org/D38918 --- sbin/pfctl/pfctl_optimize.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sbin/pfctl/pfctl_optimize.c b/sbin/pfctl/pfctl_optimize.c index d999734a906c..99c597ec84c1 100644 --- a/sbin/pfctl/pfctl_optimize.c +++ b/sbin/pfctl/pfctl_optimize.c @@ -1476,7 +1476,7 @@ superblock_inclusive(struct superblock *block, struct pf_opt_rule *por) } if (closest >= 0) - DEBUG("superblock break @ %d on %s+%xh", + DEBUG("superblock break @ %d on %s+%zxh", por->por_rule.nr, pf_rule_desc[closest].prf_name, i - pf_rule_desc[closest].prf_offset -