1 #!/bin/bash 2 3 file=$1 4 5 if [[ "$file" = "" ]] ; then 6 echo "Usage: $0 <file with smatch messages>" 7 exit 1 8 fi 9 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=" 14 " 15 for i in $(cat null_params.txt) ; do 16 grep "$i" $file | grep -w undefined 17 done 18 19