git: bcd4c17ccaac - main - pf: fix some cc --analyze warnings
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 19 Oct 2021 12:04:27 UTC
The branch main has been updated by mjg: URL: https://cgit.FreeBSD.org/src/commit/?id=bcd4c17ccaacf995224882dc1d05e2a51867bdf2 commit bcd4c17ccaacf995224882dc1d05e2a51867bdf2 Author: Mateusz Guzik <mjg@FreeBSD.org> AuthorDate: 2021-10-19 11:57:47 +0000 Commit: Mateusz Guzik <mjg@FreeBSD.org> CommitDate: 2021-10-19 11:59:11 +0000 pf: fix some cc --analyze warnings Reviewed by: kp Sponsored by: Rubicon Communications, LLC ("Netgate") --- sys/netpfil/pf/if_pfsync.c | 2 +- sys/netpfil/pf/pf_ioctl.c | 2 +- sys/netpfil/pf/pf_norm.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/netpfil/pf/if_pfsync.c b/sys/netpfil/pf/if_pfsync.c index 7208444d65d7..e959fdbc8553 100644 --- a/sys/netpfil/pf/if_pfsync.c +++ b/sys/netpfil/pf/if_pfsync.c @@ -2474,7 +2474,7 @@ VNET_SYSINIT(vnet_pfsync_init, SI_SUB_PROTO_FIREWALL, SI_ORDER_ANY, static void vnet_pfsync_uninit(const void *unused __unused) { - int ret; + int ret __diagused; pfsync_pointers_uninit(); diff --git a/sys/netpfil/pf/pf_ioctl.c b/sys/netpfil/pf/pf_ioctl.c index 89ab2b08c64a..ee265de65b45 100644 --- a/sys/netpfil/pf/pf_ioctl.c +++ b/sys/netpfil/pf/pf_ioctl.c @@ -5612,7 +5612,7 @@ hook_pf(void) { struct pfil_hook_args pha; struct pfil_link_args pla; - int ret; + int ret __diagused; if (V_pf_pfil_hooked) return; diff --git a/sys/netpfil/pf/pf_norm.c b/sys/netpfil/pf/pf_norm.c index 796d445607e7..8e14fa35bf59 100644 --- a/sys/netpfil/pf/pf_norm.c +++ b/sys/netpfil/pf/pf_norm.c @@ -1002,7 +1002,7 @@ pf_refragment6(struct ifnet *ifp, struct mbuf **m0, struct m_tag *mtag) DPFPRINTF(("refragment error %d\n", error)); action = PF_DROP; } - for (t = m; m; m = t) { + for (; m; m = t) { t = m->m_nextpkt; m->m_nextpkt = NULL; m->m_flags |= M_SKIP_FIREWALL;