HomeFreeBSD

mxge(4): avoid clang 21 warning in NO-IP configuration

Description

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

Details

Provenance
dimAuthored on Jan 15 2026, 11:31 AM
Reviewer
jhibbits
Differential Revision
D54730: mxge(4): avoid clang 21 warning in NO-IP configuration
Parents
rG988555e329d0: tdestroy: don't visit one-child node twice
Branches
Unknown
Tags
Unknown