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.
I don't know if it makes sense to set a checksum in the TCP header at
all in that configuration, but a simple solution to avoid the warning is
to skip the m_copyback call completely.
Alternatively, sum could be set to zero or another appropriate value,
but I have no idea what is correct here.