On Tue, 18 Sep 2007 13:26:49 +0100, Chris Hills <>
wrote:
>In article <. com>,
>somenath <> writes
>>Hi All,
>>
>>I was trying to learn the use of "lint" (A tool for statically
>>checking C programs)
>>So that I wrote simple c program as mentioned bellow
>>
>>#include<stdio.h>
>>int main(void)
>>{
>> printf("\n Hello World\n");
>> return 0;
>>}
>>
>>But when I use lint to check my code I get the bellow mentioned
>>warning
>>
>>helloWorld.c: (in function main)
>>helloWorld.c:4:2: Called procedure printf may access file system
>>state, but
>> globals list does not include globals fileSystem
>> A called function uses internal state, but the globals list for the
>>function
>> being checked does not include internalState (Use -internalglobs to
>>inhibit
>> warning)
>>helloWorld.c:4:2: Undocumented modification of file system state
>>possible from
>> call to printf: printf("\n Hello World\n")
>> report undocumented file system modifications (applies to
>>unspecified
>> functions if modnomods is set) (Use -modfilesys to inhibit warning)
>>
>>Could you please let me know what is the warning is all about ?
>>How can I fix this warning ?
>
>
>Try asking at www.gimpel.com
That's bad advice, since Gimpel's product is PC-lint, which has
nothing to do with the options the OP described. A fairly simple
Google search for the options mentioned in the OP's post shows that he
or she is using splint.
Silly warnings such as the one the OP described are what you'll have
to put up with in splint. You get what you pay for with lint tools in
the real world. PC-lint is worth the money if you are serious about
software quality, even if your license plate does read "CODEGOD" :^)
Regards
--
jay