Re: [PATCH] tests: avoid -Wformat= warning re unsigned mismatch
Bruno Haible via Gnulib discussion list <[email protected]>
| Newsgroups | gmane.comp.lib.gnulib.bugs |
|---|---|
| Message-ID | <224111934.tJhACgnx7J@cagnes> |
Pádraig Brady wrote:
> diff --git a/tests/test-printf-posix2.c b/tests/test-printf-posix2.c
> index d551b39ebc..8fdb1b2c83 100644
> --- a/tests/test-printf-posix2.c
> +++ b/tests/test-printf-posix2.c
> @@ -104,7 +104,7 @@ main (int argc, char *argv[])
> ret = printf ("%.10000000d", -1);
> return !(ret == 10000001 || (ret < 0 && errno == ENOMEM));
> case 6:
> - ret = printf ("%.10000000u", 1);
> + ret = printf ("%.10000000u", 1u);
> return !(ret == 10000000 || (ret < 0 && errno == ENOMEM));
> }
> return 0;
>
OK. But nearly the same test is also contained in tests/test-fprintf-posix2.c.
It would be good to keep both files in sync.
Bruno