Re: clang's static checker report.

Поиск
Список
Период
Сортировка
Искать
От
Grzegorz Jaskiewicz
Тема
Re: clang's static checker report.
Дата
Msg-id
2A66594A-E5A0-47DE-A41C-5EB41E1147EC@pointblue.com.pl
Ответ на
Список
Дерево обсуждения
clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Greg Stark <gsstark@mit.edu>
Re: clang's static checker report. Martijn van Oosterhout <kleptog@svana.org>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Greg Stark <gsstark@mit.edu>
Re: clang's static checker report. Tom Lane <tgl@sss.pgh.pa.us>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Tom Lane <tgl@sss.pgh.pa.us>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Greg Stark <gsstark@mit.edu>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Peter Eisentraut <peter_e@gmx.net>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Alex Hunsaker <badalex@gmail.com>
Re: clang's static checker report. Tom Lane <tgl@sss.pgh.pa.us>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Greg Stark <gsstark@mit.edu>
Re: clang's static checker report. Peter Eisentraut <peter_e@gmx.net>
Re: clang's static checker report. Greg Stark <gsstark@mit.edu>
Re: clang's static checker report. Tom Lane <tgl@sss.pgh.pa.us>
Re: clang's static checker report. Greg Stark <gsstark@mit.edu>
Re: clang's static checker report. Tom Lane <tgl@sss.pgh.pa.us>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Greg Stark <gsstark@mit.edu>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Greg Stark <gsstark@mit.edu>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Tom Lane <tgl@sss.pgh.pa.us>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Tom Lane <tgl@sss.pgh.pa.us>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Alvaro Herrera <alvherre@commandprompt.com>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Tom Lane <tgl@sss.pgh.pa.us>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Michael Meskes <meskes@postgresql.org>
Re: clang's static checker report. Nicolas Barbier <nicolas.barbier@gmail.com>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Greg Stark <gsstark@mit.edu>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>
Re: clang's static checker report. Grzegorz Jaskiewicz <gj@pointblue.com.pl>

On 29 Aug 2009, at 18:05, Greg Stark wrote:

> Oh, I think I see what's happening. Our assertions can still be turned
> off at run-time with the variable assert_enabled.

Index: src/include/postgres.h
===================================================================
RCS file: /projects/cvsroot/pgsql/src/include/postgres.h,v
retrieving revision 1.92
diff -b -u -r1.92 postgres.h
--- src/include/postgres.h	1 Jan 2009 17:23:55 -0000	1.92
+++ src/include/postgres.h	30 Aug 2009 11:17:50 -0000
@@ -639,6 +639,7 @@  */
 extern PGDLLIMPORT bool assert_enabled;
+#define assert_enabled (1)
 /*  * USE_ASSERT_CHECKING, if defined, turns on all the assertions.
@@ -666,7 +667,7 @@  *	Isn't CPP fun?  */ #define TrapMacro(condition, errorType) \
-	((bool) ((! assert_enabled) || ! (condition) || \
+	((bool) ( ! (condition) || \ 			 (ExceptionalCondition(CppAsString(condition), (errorType), \ 								   __FILE__, __LINE__))))

@@ -689,8 +690,10 @@ 		Trap(!(condition), "BadState") #endif   /* USE_ASSERT_CHECKING */

+#undef assert_enabled
+ extern int ExceptionalCondition(const char *conditionName, 					 const char *errorType,
-					 const char *fileName, int lineNumber);
+					 const char *fileName, int lineNumber) __attribute__ 
((analyzer_noreturn));



like that ?
This is another excerpt from my local mods, that I use before running  
clang-checker over it.

but looking at Assert() macros in code (it expands macros if you  
hoover mouse pointer over one) - it still keeps 'assert_enabled'  
literal there. damn...


В списке pgsql-hackers по дате отправления
От: Jan Otto
Дата:
От: Tatsuo Ishii
Дата:
Сообщение: PQexecPrepared() behavior
FAQ