Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   C Programming (http://www.velocityreviews.com/forums/f42-c-programming.html)
-   -   Ignore include header files with Splint (http://www.velocityreviews.com/forums/t437443-ignore-include-header-files-with-splint.html)

Henry Fr?d?ric 03-23-2005 12:37 PM

Ignore include header files with Splint
 
I am currently working in Aisin-AW, in development of navigation
systems (embedded SW).
Since a few weeks, we are checking our source code with splint.

We encounter this problem. I hope this mailing-list can help us to
solve
it :

Our team is responsible of 1 module.
In our C files, we include Header files from others modules.
Those files contain splint errors/warnings, but we cannot modify them.

How can we use splint in order to parse those files (necessary for
definitions), but without getting any warning ?

For example, this is not working and we wonder why :
/*@ignore@*/
#include bad_file.h
/*@end@*/

warnings in "bad_file.h" are displayed, anyway.

thank you in advance !

Mark Odell 03-23-2005 01:28 PM

Re: Ignore include header files with Splint
 
Henry Fr?d?ric wrote:
[snip]
> How can we use splint in order to parse those files (necessary for
> definitions), but without getting any warning ?
>
> For example, this is not working and we wonder why :
> /*@ignore@*/
> #include bad_file.h
> /*@end@*/
>
> warnings in "bad_file.h" are displayed, anyway.


May I ask why you think the C language specifies how splint should work?

Michael Wojcik 03-23-2005 09:05 PM

Re: Ignore include header files with Splint
 

In article <cd47c135.0503230437.3869ac4d@posting.google.com >, frederic.henry@awtce.be (Henry Fr?d?ric) writes:
> I am currently working in Aisin-AW, in development of navigation
> systems (embedded SW).
> Since a few weeks, we are checking our source code with splint.
>
> We encounter this problem. I hope this mailing-list can help us to
> solve it :


Splint and other lint tools, though they may be closely related to C,
are not covered by the C language specification; thus they are not,
in the opinion of most of the comp.lang.c regulars, topical here.
(There are arguments for and against this opinion which need not be
rehashed, as they are available to anyone with access to Google's
archives.) Please note that the comp.lang.c FAQ and other materials
for new readers explain what is, and is not, generally considered
topical (by most of the regulars).

While you may be lucky enough to have a Splint expert read your
question here and respond to it, I suspect you would do better to
ask the Splint developers, or consult the documentation. I am not
personally familiar with all of the documentation on the Splint
website (www.splint.org), but there does seem to be quite a lot of
it.

Incidentally, comp.lang.c is not a mailing list. It's a Usenet
newsgroup, which is quite a different thing. There are several
"introduction to the Internet" resources which can explain the
difference.

--
Michael Wojcik michael.wojcik@microfocus.com

Painful lark, labouring to rise!
The solemn mallet says:
In the grave's slot
he lies. We rot. -- Basil Bunting

Michael Mair 03-23-2005 10:57 PM

Re: Ignore include header files with Splint
 
Henry Fr?d?ric wrote:
> I am currently working in Aisin-AW, in development of navigation
> systems (embedded SW).
> Since a few weeks, we are checking our source code with splint.
>
> We encounter this problem. I hope this mailing-list can help us to
> solve
> it :
>
> Our team is responsible of 1 module.
> In our C files, we include Header files from others modules.
> Those files contain splint errors/warnings, but we cannot modify them.
>
> How can we use splint in order to parse those files (necessary for
> definitions), but without getting any warning ?
>
> For example, this is not working and we wonder why :
> /*@ignore@*/
> #include bad_file.h
> /*@end@*/


<OT>
Read the manual on header file inclusion (somewhere in chapter 14 IIRC)
about system headers and similar; if that does not help, use
/*@ignore@*/ .... /*@end@*/ _within_ the header file. If this is not
applicable in your case, ask in the splint mailing list.
</OT>

> warnings in "bad_file.h" are displayed, anyway.


Please note that this is not topical in comp.lang.c.
Try: http://www.splint.org/lists.html


Cheers
Michael
--
E-Mail: Mine is an /at/ gmx /dot/ de address.

Tor Rustad 03-23-2005 11:13 PM

Re: Ignore include header files with Splint
 
"Henry Fr?d?ric" <frederic.henry@awtce.be> wrote in message
> I am currently working in Aisin-AW, in development of navigation
> systems (embedded SW).
> Since a few weeks, we are checking our source code with splint.
>
> We encounter this problem. I hope this mailing-list can help us to
> solve
> it :
>
> Our team is responsible of 1 module.
> In our C files, we include Header files from others modules.
> Those files contain splint errors/warnings, but we cannot modify them.
>
> How can we use splint in order to parse those files (necessary for
> definitions), but without getting any warning ?
>
> For example, this is not working and we wonder why :
> /*@ignore@*/
> #include bad_file.h
> /*@end@*/
>
> warnings in "bad_file.h" are displayed, anyway.



Have you tried putting /*@ignore@*/... /*@end@*/ inside the <bad_file.h>
header file? If so, this sound as a splint bug, check their maillist and
buglist, before posting a bug report.

Regarding topicality of lint like tools here, it show that most C
programmers are too ignorant on using such tools. PvdL say:

"Separating lint out from the compiler as an independent program was a
big mistake that people are only now coming to terms with."

A cool feature with splint, is that the tool also add security checks on
e.g. formatstrings and buffer overflow vulnerabilities. People here
complain about a "worse is better" xmalloc,

http://www.ai.mit.edu/docs/articles/...tion3.2.1.html

but don't wanna hear about exstensive program checking. lol


--
Tor <torust AT online DOT no>
"To this day, many C programmers believe that 'strong typing' just means
pounding extra hard on the keyboard". PvdL



Michael Wojcik 03-24-2005 04:15 PM

Re: Ignore include header files with Splint
 

In article <HLm0e.3293$ai7.76886@news2.e.nsc.no>, "Tor Rustad" <torust@online.no.spam> writes:
> "Henry Fr?d?ric" <frederic.henry@awtce.be> wrote in message
> >
> > In our C files, we include Header files from others modules.
> > Those files contain splint errors/warnings, but we cannot modify them.

>
> Have you tried putting /*@ignore@*/... /*@end@*/ inside the <bad_file.h>
> header file?


Presumably not, as the OP explicitly states that this is forbidden.

--
Michael Wojcik michael.wojcik@microfocus.com

Henry Fr?d?ric 03-25-2005 01:05 PM

Re: Ignore include header files with Splint
 
mwojcik@newsguy.com (Michael Wojcik) wrote in message news:<d1up3j020dm@news4.newsguy.com>...
> In article <HLm0e.3293$ai7.76886@news2.e.nsc.no>, "Tor Rustad" <torust@online.no.spam> writes:
> > "Henry Fr?d?ric" <frederic.henry@awtce.be> wrote in message
> > >
> > > In our C files, we include Header files from others modules.
> > > Those files contain splint errors/warnings, but we cannot modify them.

> >
> > Have you tried putting /*@ignore@*/... /*@end@*/ inside the <bad_file.h>
> > header file?

>
> Presumably not, as the OP explicitly states that this is forbidden.


I can't proceed on this way because I can't modify the <bad_file.h>

CBFalconer 03-25-2005 06:32 PM

Re: Ignore include header files with Splint
 
Henry Fr?d?ric wrote:
> mwojcik@newsguy.com (Michael Wojcik) wrote in message
>> "Tor Rustad" <torust@online.no.spam> writes:
>>> "Henry Fr?d?ric" <frederic.henry@awtce.be> wrote in message
>>>>
>>>> In our C files, we include Header files from others modules.
>>>> Those files contain splint errors/warnings, but we cannot
>>>> modify them.
>>>
>>> Have you tried putting /*@ignore@*/... /*@end@*/ inside the
>>> <bad_file.h> header file?

>>
>> Presumably not, as the OP explicitly states that this is
>> forbidden.

>
> I can't proceed on this way because I can't modify the
> <bad_file.h>


I distinctly recall telling you how to intercept its use without
altering the actual file. I did this in some newsgroup where you
were not off-topic.

--
"If you want to post a followup via groups.google.com, don't use
the broken "Reply" link at the bottom of the article. Click on
"show options" at the top of the article, then click on the
"Reply" at the bottom of the article headers." - Keith Thompson



Tor Rustad 03-29-2005 07:05 PM

Re: Ignore include header files with Splint
 
"Michael Wojcik" <mwojcik@newsguy.com> wrote in message
>
> In article <HLm0e.3293$ai7.76886@news2.e.nsc.no>, "Tor Rustad"

<torust@online.no.spam> writes:
> > "Henry Fr?d?ric" <frederic.henry@awtce.be> wrote in message
> > >
> > > In our C files, we include Header files from others modules.
> > > Those files contain splint errors/warnings, but we cannot modify

them.
> >
> > Have you tried putting /*@ignore@*/... /*@end@*/ inside the

<bad_file.h>
> > header file?

>
> Presumably not, as the OP explicitly states that this is forbidden.


Then make a copy of the header file... for splint analysis.

--
Tor <torust AT online DOT no>





All times are GMT. The time now is 08:36 AM.

Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.


1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57