no reports generated

Hi all,

I'm working to integrate scan-build into our process for detecting
bugs, but running into an issue where I can't seem to coax scan-build
into generating any reports. I've placed the following bug in my

        int *x = NULL;
        int y = (*x) * 5;

And when I run the program, it does segfault. I have a Makefile like so:

#CXX = g++
CXXFLAGS = -Iinclude
TARGET = clangtest
LIBS = -lcppunit
OBJS = ${patsubst %.cpp,%.o,${wildcard *.cpp}}

all: ${TARGET}


  ${CXX} ${CXXFLAGS} -c $<

  rm -f ${TARGET} ${OBJS}
When I run scan-build, here are the results:

It works fine for me. What version of scan-build are you using?

Bringing this back to the list. I inadvertently replied directly to Ted.

I have tried building from source as described here:

and here:

so end up with the following version:

  $ clang -v
  clang version 3.1 (trunk 144909)
  Target: x86_64-unknown-linux-gnu
  Thread model: posix

but I get the same results.

  $ scan-build make
  scan-build: 'clang' executable not found in '/usr/local/clang/scan-build/bin'.
  scan-build: Using 'clang' from path: /usr/local/bin/clang
  /usr/local/clang/scan-build/c++-analyzer -Iinclude -c -o
TestsMain.o TestsMain.cpp
  /usr/local/clang/scan-build/c++-analyzer -Iinclude -c -o
ExampleTest.o ExampleTest.cpp
  /usr/local/clang/scan-build/c++-analyzer -Iinclude -o smstest
TestsMain.o ExampleTest.o -lcppunit
  scan-build: Removing directory '/tmp/scan-build-2011-11-17-1'
because it contains no reports.

ExampleTest.cpp contains the following:

        int *x = NULL;
        int y = (*x) * 5;

Any other ideas? I see something about patching libstdc++-4.4 needing
a patch. Could not having this patch lead to my current lack of


Actually, when I add this code to my main method, I do get a report.
So I think the reports are working, I just need to tinker with how
they work.