From: Bruno Haible Date: Sat, 24 Apr 2010 16:02:56 +0000 (+0200) Subject: Avoid a gcc warning. X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=7b0679ea71b7fb823e0d42ad27d1b106ca65fbcc;p=pspp Avoid a gcc warning. --- diff --git a/ChangeLog b/ChangeLog index 2d4a2316fc..e3a6fc9f39 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-04-24 Bruno Haible + + Avoid a gcc warning. + * tests/test-vasprintf.c (test_vasprintf, test_asprintf): Pass argument + of correct type for %08lx directive. + Reported by Eric Blake. + 2010-04-24 Bruno Haible vasnprintf: Correct errno value in case of out-of-memory. @@ -36,7 +43,7 @@ 2010-04-21 Simon Josefsson - * tests/test-vasprintf.c: Test %08lx. + * tests/test-vasprintf.c (test_vasprintf, test_asprintf): Test %08lx. 2010-04-20 Eric Blake diff --git a/tests/test-vasprintf.c b/tests/test-vasprintf.c index e5676f4a9f..cfde4f49c7 100644 --- a/tests/test-vasprintf.c +++ b/tests/test-vasprintf.c @@ -60,7 +60,7 @@ test_vasprintf () for (repeat = 0; repeat <= 8; repeat++) { char *result; - int retval = my_asprintf (&result, "%08lx", 12345); + int retval = my_asprintf (&result, "%08lx", 12345UL); ASSERT (retval == 8); ASSERT (result != NULL); ASSERT (strcmp (result, "00003039") == 0); @@ -86,7 +86,7 @@ test_asprintf () for (repeat = 0; repeat <= 8; repeat++) { char *result; - int retval = asprintf (&result, "%08lx", 12345); + int retval = asprintf (&result, "%08lx", 12345UL); ASSERT (retval == 8); ASSERT (result != NULL); ASSERT (strcmp (result, "00003039") == 0);