write-only variables in src/sys/ - possible bugs
Christoph Mallon
christoph.mallon at gmx.de
Mon Feb 2 12:56:52 PST 2009
Max Laier schrieb:
> On Monday 02 February 2009 20:42:32 Christoph Mallon wrote:
>> A small disclaimer: There might be some false positives due to errors
>> which are caused by HEAD sources in combination with my installed 7.x
>> headers plus a hacked up build process. Also some warnings are the
>> result from variables, which are only used in debug macros, so td =
>> curthread; KASSERT(td != NULL); provokes a warning (I consider this bad
>> style). Nonetheless the number of false positives should be low. If
>> there is interest, then I can compile a "proper" list.
>
> Are you interested in false positive reports? If so, I think
> sys/contrib/pf/net/pf.c:2931 is one. Seems cparser is confused by the union
> in struct assignment, maybe? Or it suffers from the similar issue with
> switch/case-statements as gcc. saddr is read from in all but the default
> case.
When neither INET nor INET6 is set, daddr and saddr are only written to.
So this part should be enclosed in #if defined INET || defined INET6.
Probably this file is not compiled at all, when neither INET nor INET6
are set, so this is certainly the result of the "hacked up build
process"-part, sorry.
More information about the freebsd-hackers
mailing list