Subject: Re: lib/36668: bogus complaints about sys/endian.h code when running lint -aa
To: None <lib-bug-people@netbsd.org, gnats-admin@netbsd.org,>
From: David Laight <david@l8s.co.uk>
List: netbsd-bugs
Date: 07/20/2007 15:55:02
The following reply was made to PR lib/36668; it has been noted by GNATS.

From: David Laight <david@l8s.co.uk>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: lib/36668: bogus complaints about sys/endian.h code when running lint -aa
Date: Fri, 20 Jul 2007 16:50:26 +0100

 On Fri, Jul 20, 2007 at 09:05:00AM +0000, mccratch@gmx.net wrote:
 > >Number:         36668
 > >Category:       lib
 > >Synopsis:       bogus complaints about sys/endian.h code when running lint -aa
 > "lint -aa" complains about "may loose accuracy" for sys/endian.h.
 > This is no bug at all, just annoying when using lint -aa.
 
 > -       p[1] = u & 0xff;
 > +       p[1] = (uint8_t)(u & 0xff);
 
 There is a big problem with adding such casts, they can very easily
 hide other (bigger) problems with the source.
 Especially if applied to every place an implicit integer narrowing
 conversion happens.
 
 	David
 
 -- 
 David Laight: david@l8s.co.uk