[cfe-dev] CLang Static Analysis -- false positives
Kent Williams
nkwmailinglists at gmail.com
Thu Apr 26 09:45:38 PDT 2012
I'm using scan-build (aka CLang Static Analysis) to check through ITK
(http://www.itk.org).
There is a common 'single exit from function' pattern used several places:
int
somefunc()
{
int status = EXIT_SUCCESS;
// do a bunch of stuff, and if there's a failure
if(failure)
{
status = EXIT_FAILURE;
}
return status;
}
I tried making a simple test case to flush out this false positive
error, but I can't seem to trigger it. Is there some trick to this?
More information about the cfe-dev
mailing list