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 | cut
-b 2- |
egrep '(warn|error|warning):') ; do
26 # we are only interested in the last chunk.
27 # "some_func(42) warn: blah blah blah"
28 last
=$
(echo $err | cut
-d ' ' -f 2-)
30 # There are some error message which include a second
31 # line number so we crudely chop that off.
32 last
=$
(echo $last |
sed -e 's/line .*//')
34 if ! grep -Fq "$last" $old ; then