5 if [[ "$file" = "" ]] ; then
6 echo "Usage: $0 <file with smatch messages>"
10 new_file
=kernel.array_bounds
12 remove
=$
(echo ${bin_dir}/..
/smatch_data
/kernel.array_bounds.remove
)
13 tmp
=$
(mktemp
/tmp
/smatch.XXXX
)
15 echo "// the format is: function <param> <max in array>" > $new_file
16 echo '// generated by `gen_puts_list.sh`' >> $new_file
17 grep "array index" warns.txt |
sed -e 's/(.*)//' | cut
-d ' ' -f 3,6,10 |
sort -u > $tmp
18 cat $tmp $remove $remove 2> /dev
/null |
sort |
uniq -u >> $new_file
20 echo "Done. List saved as 'kernel.puts_argument'"