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