[splint-discuss] Warnings when using g_assert
Jeremy Cowgar
jeremy at cowgar.com
Wed Oct 11 09:45:52 EDT 2006
That will get rid of the error, but I use g_assert 100's of times.
Jeremy
On Oct 11, 2006, at 9:42 AM, Ludolf Holzheid wrote:
> On Wed, 2006-10-11 07:18:15 -0400, Jeremy Cowgar wrote:
>> [..]
>> I can disable these checks via command line switches, but I don't
>> want to because I want to be able to detect these problems in my own
>> code. Is there another way of causing these warnings not to appear?
>
> Jeremy,
>
> it should be possible to locally disable these warnings by annotating
> the sources, e.g. by writing
>
> /*@-predboolint@*/ /*@-nullpass@*/ /*@-noeffect@*/
>
> above the g_assert() line and
>
> /*@=predboolint@*/ /*@=nullpass@*/ /*@=noeffect@*/
>
> below.
>
> Another possibility is to tell splint you expect a certain number of
> warnings for certain a line:
>
> /*@i3@*/ g_assert( ...
>
> or to disable warnings for a certain line altogether:
>
> /*@i@*/ g_assert( ...
>
>
> I'd prefer '/*@i3@*/'.
>
> hope this helps,
>
> Ludolf
>
> --
>
> ---------------------------------------------------------------
> Ludolf Holzheid Tel: +49 621 339960
> Bihl+Wiedemann GmbH Fax: +49 621 3392239
> Floßwörthstraße 41 e-mail: lholzheid at bihl-wiedemann.de
> D-68199 Mannheim, Germany
> ---------------------------------------------------------------
>
More information about the splint-discuss
mailing list