Re: write-only variables in src/sys/ - possible bugs

From: Christoph Mallon <christoph.mallon_at_gmx.de>
Date: Mon, 02 Feb 2009 21:56:42 +0100
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.
Received on Mon Feb 02 2009 - 19:56:50 UTC

This archive was generated by hypermail 2.4.0 : Wed May 19 2021 - 11:39:41 UTC