From: Jim Meyering Date: Sun, 20 Sep 2020 02:24:42 +0000 (-0700) Subject: test-verify.c: avoid -Wshadow warnings X-Git-Tag: v1.0~3618 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=40518bb8dee997613ebabc05331b6701870bdf01;p=gnulib.git test-verify.c: avoid -Wshadow warnings * tests/test-verify.c (gx): Rename global from "x". Adjust use. (enum): Capitalize member names. Adjust uses. --- diff --git a/ChangeLog b/ChangeLog index f094e97f15..541f5d7a44 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2020-09-19 Jim Meyering + + test-verify.c: avoid -Wshadow warnings + * tests/test-verify.c (gx): Rename global from "x". Adjust use. + (enum): Capitalize member names. Adjust uses. + 2020-09-19 Bruno Haible havelib: Avoid linking with libc.a on GNU systems. diff --git a/tests/test-verify.c b/tests/test-verify.c index 7201ca1fff..05e113c0a9 100644 --- a/tests/test-verify.c +++ b/tests/test-verify.c @@ -27,13 +27,13 @@ /* ======================= Test verify, verify_expr ======================= */ -int x; -enum { a, b, c }; +int gx; +enum { A, B, C }; #if EXP_FAIL == 1 -verify (x >= 0); /* should give ERROR: non-constant expression */ +verify (gx >= 0); /* should give ERROR: non-constant expression */ #endif -verify (c == 2); /* should be ok */ +verify (C == 2); /* should be ok */ #if EXP_FAIL == 2 verify (1 + 1 == 3); /* should give ERROR */ #endif @@ -50,7 +50,7 @@ function (int n) #if EXP_FAIL == 3 verify (n >= 0); /* should give ERROR: non-constant expression */ #endif - verify (c == 2); /* should be ok */ + verify (C == 2); /* should be ok */ #if EXP_FAIL == 4 verify (1 + 1 == 3); /* should give ERROR */ #endif