summaryrefslogtreecommitdiff
path: root/contrib
diff options
context:
space:
mode:
authorvries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-18 07:07:36 +0000
committervries <vries@138bc75d-0d04-0410-961f-82ee72b054a4>2015-05-18 07:07:36 +0000
commit92a91d1761ea32416ad99e7494d795bae41745a0 (patch)
tree03993f7ebfe8262d128204c6b7ffb99bc8978669 /contrib
parentb089ae166c8aeafb9a724d7c309cd9effdc29d4d (diff)
downloadgcc-92a91d1761ea32416ad99e7494d795bae41745a0.tar.gz
check_GNU_style.sh: Declare local vars with local
2015-05-18 Tom de Vries <tom@codesourcery.com> * check_GNU_style.sh (g, ag, vg, col): Declare local vars with local. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@223283 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'contrib')
-rw-r--r--contrib/ChangeLog4
-rwxr-xr-xcontrib/check_GNU_style.sh18
2 files changed, 13 insertions, 9 deletions
diff --git a/contrib/ChangeLog b/contrib/ChangeLog
index eb350088f30..1ab3fdf858b 100644
--- a/contrib/ChangeLog
+++ b/contrib/ChangeLog
@@ -1,5 +1,9 @@
2015-05-18 Tom de Vries <tom@codesourcery.com>
+ * check_GNU_style.sh (g, ag, vg, col): Declare local vars with local.
+
+2015-05-18 Tom de Vries <tom@codesourcery.com>
+
* check_GNU_style.sh: Improve readability function calls.
2015-05-12 Tom de Vries <tom@codesourcery.com>
diff --git a/contrib/check_GNU_style.sh b/contrib/check_GNU_style.sh
index b86c4742acf..728c11a691d 100755
--- a/contrib/check_GNU_style.sh
+++ b/contrib/check_GNU_style.sh
@@ -82,8 +82,8 @@ grep $format '^+' $files \
# Grep
g (){
- msg="$1"
- arg="$2"
+ local msg="$1"
+ local arg="$2"
cat $inp \
| egrep --color=always -- "$arg" \
> $tmp && printf "\n$msg\n"
@@ -92,9 +92,9 @@ g (){
# And Grep
ag (){
- msg="$1"
- arg1="$2"
- arg2="$3"
+ local msg="$1"
+ local arg1="$2"
+ local arg2="$3"
cat $inp \
| egrep --color=always -- "$arg1" \
| egrep --color=always -- "$arg2" \
@@ -104,9 +104,9 @@ ag (){
# reVerse Grep
vg (){
- msg="$1"
- varg="$2"
- arg="$3"
+ local msg="$1"
+ local varg="$2"
+ local arg="$3"
cat $inp \
| egrep -v -- "$varg" \
| egrep --color=always -- "$arg" \
@@ -115,7 +115,7 @@ vg (){
}
col (){
- msg="$1"
+ local msg="$1"
local first=true
local f
for f in $files; do