Fixes a problem for counting warnings in a summary of problems ('+s' option).
Now warnings are counted with the use of 'grep' command instead of 'wc'. Previously, '+s' option reported that there were warnings during compilation, even thought there weren't any warnings.
This commit is contained in:
parent
6ef41ceebc
commit
b892f98fa9
|
@ -574,10 +574,10 @@ fi
|
||||||
|
|
||||||
# Problems summary (part 1 of 2)
|
# Problems summary (part 1 of 2)
|
||||||
if [[ -n $SHOWSUMMARY ]] ; then
|
if [[ -n $SHOWSUMMARY ]] ; then
|
||||||
ERRORSNUM=`grep -i "^\!" "$FILENAME".log | wc -l`
|
ERRORSNUM=`grep -c -i "^\!" "$FILENAME".log`
|
||||||
ERRORS=`grep -A2 -i "^\!" "$FILENAME".log`
|
ERRORS=`grep -A2 -i "^\!" "$FILENAME".log`
|
||||||
WARNINGS=`grep -i warning "$FILENAME".log | grep -v -i infwarerr`
|
WARNINGS=`grep -i warning "$FILENAME".log | grep -v -i infwarerr`
|
||||||
WARNINGSNUM=`echo "$WARNINGS" | wc -l`
|
WARNINGSNUM=`echo "$WARNINGS" | grep -c -i warning`
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
|
|
Loading…
Reference in New Issue