Source-Changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
CVS commit: src/sys/kern
Module Name: src
Committed By: riastradh
Date: Tue Feb 8 12:59:17 UTC 2022
Modified Files:
src/sys/kern: subr_pcu.c subr_psref.c subr_thmap.c
Log Message:
kern: Mark some functions __diagused to pacify clang.
These functions are called only in KASSERT. This shouldn't be a
problem since the recent change to make KASSERT compile (but not run)
the expression, via sizeof, so the functions are referenced -- which
I did in order to avoid having #ifdefs and regular build breakage
because someone forgot to build with or without DIAGNOSTIC. But
apparently clang decided to make it a problem.
Maybe we should just set -Wno-unneeded-internal-declaration -- not
clear it flags any real problems, but it takes effort to research
because apparently clang has no documentation about what else it does
or why anyone decided this is objectionable enough to turn it on by
default. (The only documentation it seems to have, two example
warning messages with no elaboration at
<https://releases.llvm.org/13.0.0/tools/clang/docs/DiagnosticsReference.html#wunneeded-internal-declaration>,
seems to indicate it is mixed up with warning about static non-inline
functions in header files.)
To generate a diff of this commit:
cvs rdiff -u -r1.25 -r1.26 src/sys/kern/subr_pcu.c
cvs rdiff -u -r1.16 -r1.17 src/sys/kern/subr_psref.c
cvs rdiff -u -r1.8 -r1.9 src/sys/kern/subr_thmap.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Home |
Main Index |
Thread Index |
Old Index