[splint-discuss] Re: Parse error due to byteorder.h
ptp at lysator.liu.se
Mon May 29 06:05:20 EDT 2006
On Mon, May 29, 2006 at 10:02:46AM +0530, rasmit.ranjan at wipro.com wrote:
> > Is it possible for you to make a copy of the .h file, put
> > #ifndef S_SPLINT_S around the offending code like -help
> > parseerrors suggests, and include that .h file instead of the
> > original?
> No this is not possible. In my case, I have a module having more than 20
> .c files and some of the .h files. In one of the .h file I have
> included byteorder.h. But even if I remove this file still splint gives
> same sparse error in byteorder.h.
> That means byteorder.h is getting linked indirectly from any other .h
> file I have included.
Have you tried the -I option. Have you tried reading the splint
Anyway, by looking at byteorder.h it doesn't look like having
much value to splint. For good checking you should probably
write special .h files for these system and/or library
interfaces; remove the technical magic that splint barfs on, and
focus on splint annotations, i.e., #define:s should be annotated
as functions or constants etc.
More information about the splint-discuss