db: ignore unreachable returns
[smatch.git] / smatch_scripts / find_null_params.sh
blob9e39146d2d40d417230dfb7d5d28508cfa6fea6f
1 #!/bin/bash
3 file=$1
5 if [[ "$file" = "" ]] ; then
6 echo "Usage: $0 <file with smatch messages>"
7 exit 1
8 fi
10 grep " unchecked " $file | cut -d ' ' -f 5- | sort -u > unchecked
11 grep " undefined " $file | cut -d ' ' -f 5- | sort -u > null_calls.txt
12 cat null_calls.txt unchecked | sort | uniq -d > null_params.txt
13 IFS="
15 for i in $(cat null_params.txt) ; do
16 grep "$i" $file | grep -w undefined
17 done