From 40518bb8dee997613ebabc05331b6701870bdf01 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Sat, 19 Sep 2020 19:24:42 -0700 Subject: [PATCH] test-verify.c: avoid -Wshadow warnings * tests/test-verify.c (gx): Rename global from "x". Adjust use. (enum): Capitalize member names. Adjust uses. --- ChangeLog | 6 ++++++ tests/test-verify.c | 10 +++++----- 2 files changed, 11 insertions(+), 5 deletions(-) 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 -- 2.39.5