[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
posixtm tests: Fix warnings seen on MidnightBSD/x86
From: |
Bruno Haible |
Subject: |
posixtm tests: Fix warnings seen on MidnightBSD/x86 |
Date: |
Mon, 08 Feb 2021 21:32:50 +0100 |
User-agent: |
KMail/5.1.3 (Linux/4.4.0-197-generic; KDE/5.18.0; x86_64; ; ) |
On MidnightBSD 2.0/x86 I see these warnings:
../../gltests/test-random.c:22:18: warning: initialization from incompatible
pointer type [-Wincompatible-pointer-types]
../../gltests/test-random.c:23:18: warning: initialization from incompatible
pointer type [-Wincompatible-pointer-types]
This patch should fix them.
2021-02-08 Bruno Haible <bruno@clisp.org>
posixtm tests: Fix warnings seen on MidnightBSD/x86.
* tests/test-posixtm.c (main): Convert two 'time_t' values to 'long' for
printing.
diff --git a/tests/test-posixtm.c b/tests/test-posixtm.c
index ea20564..b07e0c5 100644
--- a/tests/test-posixtm.c
+++ b/tests/test-posixtm.c
@@ -178,7 +178,7 @@ main (void)
if (t_out != t_exp)
{
printf ("%s mismatch (-: actual; +:expected)\n-%12ld\n+%12ld\n",
- T[i].in, t_out, t_exp);
+ T[i].in, (long) t_out, (long) t_exp);
fail = 1;
}
}
- posixtm tests: Fix warnings seen on MidnightBSD/x86,
Bruno Haible <=