opnsense-src/sys/dev/mxge
Dimitry Andric 0b52fb5069 mxge(4): avoid clang 21 warning in NO-IP configuration
Building the LINT-NOIP kernel on amd64 with clang 21 results in a
-Werror warning similar to:

    sys/dev/mxge/if_mxge.c:1846:44: error: variable 'sum' is uninitialized when passed as a const pointer argument here [-Werror,-Wuninitialized-const-pointer]
     1846 |                     cksum_offset, sizeof(sum), (caddr_t)&sum);
          |                                                          ^~~

Indeed, if both `INET` and `INET6` are undefined, `sum` is never
initialized. Initialize it to zero to silence the warning.

Reviewed by:	jhibbits
MFC after:	3 days
Differential Revision: https://reviews.freebsd.org/D54730

(cherry picked from commit 74cac745fe302b26ad22114f60735c8b73e90571)
2026-01-26 09:41:28 +01:00
..
eth_z8e.h sys: Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:17 -06:00
ethp_z8e.h sys: Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:17 -06:00
if_mxge.c mxge(4): avoid clang 21 warning in NO-IP configuration 2026-01-26 09:41:28 +01:00
if_mxge_var.h sys: Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:17 -06:00
mcp_gen_header.h sys: Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:17 -06:00
mxge_eth_z8e.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
mxge_ethp_z8e.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
mxge_mcp.h sys: Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:17 -06:00
mxge_rss_eth_z8e.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
mxge_rss_ethp_z8e.c sys: Automated cleanup of cdefs and other formatting 2023-11-26 22:24:00 -07:00
rss_eth_z8e.h sys: Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:17 -06:00
rss_ethp_z8e.h sys: Remove $FreeBSD$: one-line bare tag 2023-08-16 11:55:17 -06:00