summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorEric Blake <eblake@redhat.com>2011-07-08 15:57:31 -0600
committerEric Blake <eblake@redhat.com>2011-07-08 15:57:31 -0600
commit71af89e818c5673a6b3ded7f9dbd78015222fb90 (patch)
tree0ebe4e658fa048887ef76063ac838265120c291f /tests
parentb11005d198f23562df043c156a4d5a5389aec31b (diff)
downloadgnulib-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.c2
-rw-r--r--tests/test-vsnprintf.c2
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));
}