From: | Grzegorz Jaskiewicz <gj(at)pointblue(dot)com(dot)pl> |
---|---|
To: | Grzegorz Jaskiewicz <gj(at)pointblue(dot)com(dot)pl> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Greg Stark <gsstark(at)mit(dot)edu>, pgsql-hackers Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: clang's static checker report. |
Date: | 2009-08-23 22:16:59 |
Message-ID: | 61BBC425-BD75-4DC9-8BE3-A6570E41D08B@pointblue.com.pl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
ok folks, here's the last one for Today:
http://zlew.org/postgresql_static_check/scan-build-2009-08-23-29/
tar ball with report can be downloaded from here: http://zlew.org/postgresql_static_check/postgresql_static_check_23rdAugust2009.tar.xz
(compressed with lzma's xz tool).
here's the patch for elog stuff:
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 22:16:05 -0000
@@ -104,7 +104,7 @@
*/
#define ereport_domain(elevel, domain, rest) \
(errstart(elevel, __FILE__, __LINE__, PG_FUNCNAME_MACRO, domain) ? \
- (errfinish rest) : (void) 0)
+ (errfinish rest) : (void) 0), (elevel >= ERROR) ? exit(1) : 0
#define ereport(elevel, rest) \
ereport_domain(elevel, TEXTDOMAIN, rest)
@@ -190,7 +190,7 @@
* elog(ERROR, "portal \"%s\" not found", stmt->portalname);
*----------
*/
-#define elog elog_start(__FILE__, __LINE__, PG_FUNCNAME_MACRO),
elog_finish
+#define elog(A, ...) elog_start(__FILE__, __LINE__,
PG_FUNCNAME_MACRO), elog_finish(A, __VA_ARGS__), (A >= ERROR) ?
exit(1) : 0
extern void elog_start(const char *filename, int lineno, const char
*funcname);
extern void
hopefully satisfying everyone.
Hope to see few fixes out of that ;)
thanks.
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2009-08-23 22:29:12 | Re: [PATCH 5/6] psql: print_aligned_text uses table formatting |
Previous Message | Grzegorz Jaskiewicz | 2009-08-23 19:34:27 | Re: clang's static checker report. |