Mercurial > hg > octave-lyh > gnulib-hg
changeset 13260:45dad26de835
Avoid a gcc warning.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sat, 24 Apr 2010 18:02:56 +0200 |
parents | 5aa26fc2aec0 |
children | 279d5dca8f6a |
files | ChangeLog tests/test-vasprintf.c |
diffstat | 2 files changed, 10 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-04-24 Bruno Haible <bruno@clisp.org> + + 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 <bruno@clisp.org> vasnprintf: Correct errno value in case of out-of-memory. @@ -36,7 +43,7 @@ 2010-04-21 Simon Josefsson <simon@josefsson.org> - * tests/test-vasprintf.c: Test %08lx. + * tests/test-vasprintf.c (test_vasprintf, test_asprintf): Test %08lx. 2010-04-20 Eric Blake <eblake@redhat.com>
--- a/tests/test-vasprintf.c +++ b/tests/test-vasprintf.c @@ -60,7 +60,7 @@ 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 @@ 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);