diff --git a/clang-analyze.sh b/clang-analyze.sh index b8007b3c..e59d03c8 100755 --- a/clang-analyze.sh +++ b/clang-analyze.sh @@ -3,13 +3,11 @@ set -e # do not use configfile.c since it is a lex file from configfile.l -if [ $# -lt 1 ] -then - files=$(ls -1 src/*.c | grep -v configfile | grep -v tokenparser) -else - files="$@" -fi -inc="-I. -Isrc -Isrc/PCSC -I/usr/include/hal -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include " -opt="--analyze " - -clang $inc $opt $files +pcscd_files="src/atrhandler.c src/auth.c src/debuglog.c src/dyn_unix.c src/eventhandler.c src/hotplug_generic.c src/hotplug_libudev.c src/hotplug_libusb.c src/ifdwrapper.c src/pcscdaemon.c src/prothandler.c src/readerfactory.c src/simclist.c src/sys_unix.c src/utils.c src/winscard.c src/winscard_msg.c src/winscard_msg_srv.c src/winscard_svc.c" +lib_files="src/debug.c src/winscard_clnt.c src/sys_unix.c src/utils.c src/winscard_msg.c" + +inc="-Ibuilddir -Isrc -Isrc/PCSC -I/usr/include/hal -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/polkit-1 -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include" +opt="--analyze" + +clang $inc -DPCSCD $opt $pcscd_files +clang $inc $opt $lib_files