clang's static checker report.

From: Grzegorz Jaskiewicz <gj(at)pointblue(dot)com(dot)pl>
To: pgsql-hackers Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: clang's static checker report.
Date: 2009-08-23 15:57:58
Message-ID: B69D9C3D-1E5A-4D53-9C7F-C894F1FC1469@pointblue.com.pl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

So,

after successful, and helpful Saturday with llvm's clang static
checker, I decided to run it against postgresql's source code.
Result can be seen at: http://zlew.org/postgresql_static_check/scan-build-2009-08-23-5/
.
One directory below is the tar file, with the report.

I am sure there's plenty of false positives, but I am also quite sure
there's many real errors on that list. As I have rather bad
experiences with any patches sent here - I hope that's least I can
help with.

To run clang-check I had to change one of the makefiles slightly, as
the postgresql's build system seems to ignore $CC variable
completely , always sticking to the one chosen by the configure script.

The changed file is ./src/Makefile.global. Around line 210 I included
ifdef CC, like that:

ifndef CC
CC = gcc -no-cpp-precomp
GCC = yes
endif

Which later allowed me to run "scan-build make" without issues.

hope that's helpfull.

thanks.

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Greg Stark 2009-08-23 16:41:24 Re: clang's static checker report.
Previous Message Alvaro Herrera 2009-08-23 15:47:02 Re: [PATCH 5/6] psql: print_aligned_text uses table formatting