clang's static checker report. - Mailing list pgsql-hackers

From Grzegorz Jaskiewicz
Subject clang's static checker report.
Date
Msg-id B69D9C3D-1E5A-4D53-9C7F-C894F1FC1469@pointblue.com.pl
Whole thread Raw
Responses Re: clang's static checker report.  (Greg Stark <gsstark@mit.edu>)
List 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.





pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: 8.5 release timetable, again
Next
From: Greg Stark
Date:
Subject: Re: clang's static checker report.