From 7cac395e870d29a2e45e6261218dd935c099bcbd Mon Sep 17 00:00:00 2001 From: Rasmus Villemoes Date: Wed, 24 Jun 2015 12:03:55 +0200 Subject: [PATCH] prefix smatch generated files by smatch_ 'warns.txt' is a rather generic name. Make sure that the files smatch leaves behind in a kernel source tree are prefixed by smatch_, making it easier to ignore them (either just mentally, or by adding a pattern to .git/info/exclude). Signed-off-by: Dan Carpenter --- Documentation/smatch.txt | 2 +- smatch_scripts/build_kernel_data.sh | 8 ++++---- smatch_scripts/test_kernel.sh | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/Documentation/smatch.txt b/Documentation/smatch.txt index 707e9aeb..bc60b086 100644 --- a/Documentation/smatch.txt +++ b/Documentation/smatch.txt @@ -43,7 +43,7 @@ command: ~/progs/smatch/devel/smatch_scripts/test_kernel.sh The test_kernel.sh script will create a .c.smatch file for every file it tests -and a combined warns.txt file with all the warnings. +and a combined smatch_warns.txt file with all the warnings. If you are running Smatch just over one kernel file: diff --git a/smatch_scripts/build_kernel_data.sh b/smatch_scripts/build_kernel_data.sh index c89a4463..cacf065e 100755 --- a/smatch_scripts/build_kernel_data.sh +++ b/smatch_scripts/build_kernel_data.sh @@ -27,8 +27,8 @@ fi # If someone is building the database for the first time then make sure all the # required packages are installed if [ ! -e smatch_db.sqlite ] ; then - [ -e warns.txt ] || touch warns.txt - if ! $DATA_DIR/db/create_db.sh -p=kernel warns.txt ; then + [ -e smatch_warns.txt ] || touch smatch_warns.txt + if ! $DATA_DIR/db/create_db.sh -p=kernel smatch_warns.txt ; then echo "Hm... Not working. Make sure you have all the sqlite3 packages" echo "And the sqlite3 libraries for Perl and Python" exit 1 @@ -38,10 +38,10 @@ fi $SCRIPT_DIR/test_kernel.sh --call-tree --info --param-mapper --spammy --data=$DATA_DIR for i in $SCRIPT_DIR/gen_* ; do - $i warns.txt -p=kernel + $i smatch_warns.txt -p=kernel done mv ${PROJECT}.* $DATA_DIR -$DATA_DIR/db/create_db.sh -p=kernel warns.txt +$DATA_DIR/db/create_db.sh -p=kernel smatch_warns.txt diff --git a/smatch_scripts/test_kernel.sh b/smatch_scripts/test_kernel.sh index c78eabf6..40191697 100755 --- a/smatch_scripts/test_kernel.sh +++ b/smatch_scripts/test_kernel.sh @@ -28,6 +28,6 @@ fi make clean find -name \*.c.smatch -exec rm \{\} \; make -j${NR_CPU} -k CHECK="$CMD -p=kernel --file-output $*" \ - C=1 bzImage modules 2>&1 | tee compile.warns -find -name \*.c.smatch -exec cat \{\} \; -exec rm \{\} \; > warns.txt + C=1 bzImage modules 2>&1 | tee smatch_compile.warns +find -name \*.c.smatch -exec cat \{\} \; -exec rm \{\} \; > smatch_warns.txt -- 2.11.4.GIT