[splint-discuss] Warnings when using g_assert
Ludolf Holzheid
lholzheid at bihl-wiedemann.de
Wed Oct 11 09:42:39 EDT 2006
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