diff options
author | Eric Blake <eblake@redhat.com> | 2011-07-08 15:57:31 -0600 |
---|---|---|
committer | Eric Blake <eblake@redhat.com> | 2011-07-08 15:57:31 -0600 |
commit | 71af89e818c5673a6b3ded7f9dbd78015222fb90 (patch) | |
tree | 0ebe4e658fa048887ef76063ac838265120c291f /tests | |
parent | b11005d198f23562df043c156a4d5a5389aec31b (diff) | |
download | gnulib-71af89e818c5673a6b3ded7f9dbd78015222fb90.tar.gz |
test-snprintf: avoid compiler warning
* tests/test-snprintf.c (main): Avoid shadowed declaration.
* tests/test-vsnprintf.c (main): Likewise.
Reported by Jim Meyering.
Signed-off-by: Eric Blake <eblake@redhat.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test-snprintf.c | 2 | ||||
-rw-r--r-- | tests/test-vsnprintf.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/tests/test-snprintf.c b/tests/test-snprintf.c index 18efed5185..2b5a54c4af 100644 --- a/tests/test-snprintf.c +++ b/tests/test-snprintf.c @@ -63,7 +63,7 @@ main (int argc, char *argv[]) /* Test the support of the POSIX/XSI format strings with positions. */ { char result[100]; - int retval = snprintf (result, sizeof (result), "%2$d %1$d", 33, 55); + retval = snprintf (result, sizeof (result), "%2$d %1$d", 33, 55); ASSERT (strcmp (result, "55 33") == 0); ASSERT (retval == strlen (result)); } diff --git a/tests/test-vsnprintf.c b/tests/test-vsnprintf.c index 6711f39b6a..7a520824bb 100644 --- a/tests/test-vsnprintf.c +++ b/tests/test-vsnprintf.c @@ -76,7 +76,7 @@ main (int argc, char *argv[]) /* Test the support of the POSIX/XSI format strings with positions. */ { char result[100]; - int retval = my_snprintf (result, sizeof (result), "%2$d %1$d", 33, 55); + retval = my_snprintf (result, sizeof (result), "%2$d %1$d", 33, 55); ASSERT (strcmp (result, "55 33") == 0); ASSERT (retval == strlen (result)); } |