this one should contain substantialy less false positives, because
error functions were marked as the 'never exit' points:
http://zlew.org/postgresql_static_check/scan-build-2009-08-23-9/
for the record, here's patch that marks elog, etc as dead ends:
Index: src/include/utils/elog.h
===================================================================
RCS file: /projects/cvsroot/pgsql/src/include/utils/elog.h,v
retrieving revision 1.101
diff -u -b -r1.101 elog.h
--- src/include/utils/elog.h 11 Jun 2009 14:49:13 -0000 1.101
+++ src/include/utils/elog.h 23 Aug 2009 19:20:55 -0000
@@ -112,8 +112,8 @@ #define TEXTDOMAIN NULL
extern bool errstart(int elevel, const char *filename, int lineno,
- const char *funcname, const char *domain);
-extern void errfinish(int dummy,...);
+ const char *funcname, const char *domain)
__attribute__((analyzer_noreturn));
+extern void errfinish(int dummy,...)
__attribute__((analyzer_noreturn));
extern int errcode(int sqlerrcode);
@@ -197,7 +197,7 @@ elog_finish(int elevel, const char *fmt,...) /* This extension allows gcc to check the format
stringfor
consistency with the supplied arguments. */
-__attribute__((format(printf, 2, 3)));
+__attribute__((format(printf, 2, 3)))
__attribute__((analyzer_noreturn));
/* Support for attaching context information to error reports */