aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Pop <sebastian.pop@amd.com>2010-09-17 19:09:47 +0000
committerSebastian Pop <spop@gcc.gnu.org>2010-09-17 19:09:47 +0000
commit8cab7c1398a6275c0b8e4132f3c2d1e22181c00b (patch)
treed94017f6a225f70a79ef90380537062de55da982
parent2b3ded42e21a97f7d4a04f13280cc3eeb98f60ca (diff)
downloadgcc-8cab7c1398a6275c0b8e4132f3c2d1e22181c00b.zip
gcc-8cab7c1398a6275c0b8e4132f3c2d1e22181c00b.tar.gz
gcc-8cab7c1398a6275c0b8e4132f3c2d1e22181c00b.tar.bz2
Do not print warning messages when there are no occurences.
2010-07-02 Sebastian Pop <sebastian.pop@amd.com> * check_GNU_style.sh: Do not print warning messages when there are no occurences. From-SVN: r164378
-rw-r--r--contrib/ChangeLog5
-rwxr-xr-xcontrib/check_GNU_style.sh7
2 files changed, 10 insertions, 2 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index 26c446c..000d274 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -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.
diff --git a/contrib/check_GNU_style.sh b/contrib/check_GNU_style.sh
index 6396417..8fb579f 100755
--- a/contrib/check_GNU_style.sh
+++ b/contrib/check_GNU_style.sh
@@ -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.' $*