HomeFreeBSD

pfctl: fix superblock printf format mismatch

Description

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

Details

Provenance
vegeta_tuxpowered.netAuthored on Mar 6 2023, 7:08 AM
kpCommitted on Mar 6 2023, 6:22 PM
Reviewer
kp
Differential Revision
D38918: pfctl: Fix superblock printf format mismatch
Parents
rGcec2d0b1c7ac: readelf: fix -wR option, memory leaks, and -wf minor bug
Branches
Unknown
Tags
Unknown