Re: clang's static checker report.
От | Grzegorz Jaskiewicz |
---|---|
Тема | Re: clang's static checker report. |
Дата | |
Msg-id | 80BF6479-D853-41F9-8272-52D3E5393592@pointblue.com.pl обсуждение исходный текст |
Ответ на | Re: clang's static checker report. (Grzegorz Jaskiewicz <gj@pointblue.com.pl>) |
Ответы |
Re: clang's static checker report.
|
Список | pgsql-hackers |
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 */
В списке pgsql-hackers по дате отправления: