6 if [ "$old" = "" ] ; then
7 echo "usage: $0 <new file> <old file>"
12 # If the $old and $new are very similar then we can
13 # filter out a lot of bug just by doing a diff.
15 # But the line numbers change quite frequently so
16 # really we only want to see if the line numbers
17 # have changed inside the function.
18 # The 42 in this message:
19 # file.c +123 some_func(42) warn: blah blah blah
24 for err
in $
(diff -u $old $new |
grep ^
+ | cut
-b 2- | \
25 egrep '(warn|error):' |
grep " +[1-9]") ; do
27 # we are only interested in the last chunk.
28 # "some_func(42) warn: blah blah blah"
29 last
=$
(echo $err | cut
-d ' ' -f 3-)
31 # There are some error message which include a second
32 # line number so we crudely chop that off.
33 last
=$
(echo $last |
sed -e 's/line .*//')
35 if ! grep -Fq "$last" $old ; then