Error compiling libctf-regression test
Checks
Commit Message
Seen on 64-bit targets.
ERROR: compilation of lookup program .../libctf-regression/gzrewrite.c failed
* testsuite/libctf-regression/gzrewrite.c (main): Use %zu to
print size_t values.
* testsuite/libctf-regression/zrewrite.c (main): Likewise.
Comments
On 20 Apr 2024, Alan Modra stated:
> Seen on 64-bit targets.
Interesting. I compile on a number of those targets and never saw this...
> ERROR: compilation of lookup program .../libctf-regression/gzrewrite.c failed
>
> * testsuite/libctf-regression/gzrewrite.c (main): Use %zu to
> print size_t values.
> * testsuite/libctf-regression/zrewrite.c (main): Likewise.
... but this is obviously correct anyway, thank you.
@@ -88,7 +88,7 @@ main (int argc, char *argv[])
if (a_len != b_len || memcmp (a, b, a_len) != 0)
{
- fprintf (stderr, "consecutive gzwrites are different: lengths %i and %i\n", a_len, b_len);
+ fprintf (stderr, "consecutive gzwrites are different: lengths %zu and %zu\n", a_len, b_len);
return 1;
}
@@ -83,7 +83,7 @@ main (int argc, char *argv[])
if (a_len != b_len || memcmp (a, b, a_len) != 0)
{
- fprintf (stderr, "consecutive compress_writes are different: lengths %i and %i\n", a_len, b_len);
+ fprintf (stderr, "consecutive compress_writes are different: lengths %zu and %zu\n", a_len, b_len);
return 1;
}