Re: clang's static checker report. - Mailing list pgsql-hackers

From Alex Hunsaker
Subject Re: clang's static checker report.
Date
Msg-id 34d269d40908271041q56667b98jb8500aa12a61eb14@mail.gmail.com
Whole thread Raw
In response to Re: clang's static checker report.  (Grzegorz Jaskiewicz <gj@pointblue.com.pl>)
Responses Re: clang's static checker report.  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Thu, Aug 27, 2009 at 06:39, Grzegorz Jaskiewicz<gj@pointblue.com.pl> wrote:
> heh, sorry folks for the noise again :/
>
> There was a fair amount of false positives there - due to nature of Assert()
> macro. Mainly, since assert_enabled is a runtime variable, not a macro
> (which I sadly overlooked).
>
> So, hardcoding it to (1) (using CPP) removed quite few false positives.
>
> New results at:
>
> http://zlew.org/postgresql_static_check/scan-build-2009-08-27-4/
> archive at:
> http://zlew.org/postgresql_static_check/postgresql_static_check_27thAugust2009_2.tar.xz
>
> Please tell me, if you think that it can be improved more.

Looks like your still missing ExitPostmaster(1) see
http://zlew.org/postgresql_static_check/scan-build-2009-08-27-4/report-iqR9gz.html#EndPath.

and maybe ereport(ERROR) ?

see http://zlew.org/postgresql_static_check/scan-build-2009-08-27-4/report-gkkK9S.html#EndPath
it calls report_untranslatable_char() which in turn calls ereport(ERROR)
(do you have to mark every function that calls ereport(ERROR) as one
that exits?)

:)


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: [pgsql-hackers] Daily digest v1.9418 (15 messages)
Next
From: Tom Lane
Date:
Subject: Re: clang's static checker report.