OSDN Git Service

Do not print warning messages when there are no occurences.
authorspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Sep 2010 19:09:47 +0000 (19:09 +0000)
committerspop <spop@138bc75d-0d04-0410-961f-82ee72b054a4>
Fri, 17 Sep 2010 19:09:47 +0000 (19:09 +0000)
2010-07-02  Sebastian Pop  <sebastian.pop@amd.com>

* check_GNU_style.sh: Do not print warning messages when there are
no occurences.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@164378 138bc75d-0d04-0410-961f-82ee72b054a4

contrib/ChangeLog
contrib/check_GNU_style.sh

index 26c446c..000d274 100644 (file)
@@ -1,3 +1,8 @@
+2010-07-02  Sebastian Pop  <sebastian.pop@amd.com>
+
+       * check_GNU_style.sh: Do not print warning messages when there are
+       no occurences.
+
 2010-09-13  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
 
        * gcc_update: Handle hg, too.
index 6396417..8fb579f 100755 (executable)
@@ -84,8 +84,11 @@ col (){
        | grep -v ':+++' \
        | cut -f 2 -d '+' \
        | awk '{ if (length ($0) > 80) print $0 }' \
-       > $tmp && printf "\n$msg\n"
-    cat $tmp
+       > $tmp
+    if [ -s $tmp ]; then
+       printf "\n$msg\n"
+       cat $tmp
+    fi
 }
 
 col 'Lines should not exceed 80 characters.' $*