4 project
=$
(echo "$2" | cut
-d = -f 2)
6 if [[ "$file" = "" ]] ; then
7 echo "Usage: $0 <file with smatch messages> -p=<project>"
11 outfile
="${project}.no_return_funcs"
13 add_file
=$
(echo ${bin_dir}/..
/smatch_data
/${outfile}.add
)
14 remove
=$
(echo ${bin_dir}/..
/smatch_data
/${outfile}.remove
)
15 tmp
=$
(mktemp
/tmp
/smatch.XXXX
)
16 tmp2
=$
(mktemp
/tmp
/smatch.XXXX
)
18 echo "// list of functions which don't return." > $outfile
19 echo '// generated by `gen_no_return_funcs.sh`' >> $outfile
20 cat $
(echo ${bin_dir}/..
/smatch_data
/no_return_funcs
) >> $outfile
21 cat $add_file >> $outfile
23 grep no_return_funcs
$file | cut
-d ' ' -f 2 | cut
-d '(' -f 1 > $tmp
25 cat $tmp |
sort -u > $tmp2
27 cat $tmp $remove $remove 2> /dev
/null |
sort |
uniq -u >> $outfile
29 echo "Done. List saved as '$outfile'"
30 echo "Copy it to smatch_data/<project>.no_return_funcs"