[splint-discuss] recognize typedef'd void?
Michael Wojcik
Michael.Wojcik at MicroFocus.com
Mon Dec 31 14:41:55 PST 2007
> From: splint-discuss-bounces at cs.virginia.edu
> [mailto:splint-discuss-bounces at cs.virginia.edu] On Behalf Of
> Aaron Davies
> Sent: Monday, 31 December, 2007 15:57
>
> is it just me, or should this produce no warnings?
>
> typedef void V;
> static V foo(){return;}
> int main(/*@unused@*/int argc,/*@unused@*/char**argv){foo();return 0;}
Yes, that looks like a Splint bug; it should recognize that V is a
typedef for void, and so not warn about a missing return value for
foo(). Probably not a difficult fix, but I don't have the Splint source
handy to check.
Actually, I'm a bit surprised Splint doesn't warn about the lack of a
prototype for foo() here, but that's another matter.
--
Michael Wojcik
Principal Software Systems Developer, Micro Focus
More information about the splint-discuss
mailing list