]> Savannah Git Hosting - gnulib.git/commitdiff
test-verify.c: avoid -Wshadow warnings
authorJim Meyering <meyering@fb.com>
Sun, 20 Sep 2020 02:24:42 +0000 (19:24 -0700)
committerJim Meyering <meyering@fb.com>
Sun, 20 Sep 2020 02:24:51 +0000 (19:24 -0700)
* tests/test-verify.c (gx): Rename global from "x". Adjust use.
(enum): Capitalize member names. Adjust uses.

ChangeLog
tests/test-verify.c

index f094e97f15fd19ac623348833512918633fa961e..541f5d7a440d3e5e20ed1fad841397b300ac4a43 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2020-09-19  Jim Meyering  <meyering@fb.com>
+
+       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  <bruno@clisp.org>
 
        havelib: Avoid linking with libc.a on GNU systems.
index 7201ca1fffaa3bf096dea86add0fa4e2d89947be..05e113c0a93ca13660e13207e39a809a051e75eb 100644 (file)
 
 /* ======================= 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