5 if [ "$1" = "-C" ] ; then
11 if [ "$1" = "-k" ] ; then
16 if [ "$1" = "-b" ] ; then
26 if [[ "$file" = "" ]] ; then
27 echo "Usage: $0 [-C <lines>] [-b] [-k] <file with smatch messages>"
28 echo " -C <lines>: Print <lines> of context"
29 echo " -b : Ignore unreachable break statements"
30 echo " -k : Ignore some kernel defines"
34 grep 'ignoring unreachable' $file | cut
-d ' ' -f1,2 |
while read code_file line
; do
36 if [ "$mode" = "kernel" ] ; then
37 # BUG() is sometimes defined away on embedded systems
38 if tail -n +$
(($line - 1)) $code_file |
head -n 1 | \
39 egrep -qw '(BUG|BT_STATE_CHANGE)' ; then
42 if tail -n +$
(($line)) $code_file |
head -n 1 | \
43 egrep -qw '(DLM_ASSERT|BT_SI_SM_RETURN|BT_STATE_CHANGE|PARSE_ERROR1|PARSE_ERROR|CMDINSIZE|PROCESS_SYSTEM_PARAM|RETURN_STATUS|ar9170_regwrite_result)' ; then
48 if [ "$nobreak" = "yes" ] ; then
49 if tail -n +$
(($line)) $code_file |
head -n 1 |
grep -qw 'break' ; then
54 echo "========================================================="
56 tail -n +$
(($line - ($context - 1))) $code_file |
head -n $
(($context - 1))
57 echo "---------------------------------------------------------"
58 tail -n $line $code_file |
head -n $context