]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
posixtm-tests: pacify -Wuseless-cast
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 11 May 2026 03:50:26 +0000 (20:50 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Mon, 11 May 2026 03:59:52 +0000 (20:59 -0700)
* tests/test-posixtm.c (main): Use compound literals, not casts.

ChangeLog
tests/test-posixtm.c

index 3e2fc600cc09c33997703c377a5ab1d3a430cab6..76ae6d2a065f74c009fb080417c42698e4e82b9b 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2026-05-10  Paul Eggert  <eggert@cs.ucla.edu>
 
+       posixtm-tests: pacify -Wuseless-cast
+       * tests/test-posixtm.c (main): Use compound literals, not casts.
+
        inttostr-tests: pacify -Wuseless-cast
        * tests/test-inttostr.c (CK): Use compound literals, not casts.
 
index 950bdac74e0533db24af1f71d138271a2366b323..002aa705cb8af31998db7ed148e51b0a948fcdc8 100644 (file)
@@ -186,7 +186,7 @@ main (void)
       if (t_out != t_exp)
         {
           printf ("%s mismatch (-: actual; +:expected)\n-%12ld\n+%12ld\n",
-                  T[i].in, (long) t_out, (long) t_exp);
+                  T[i].in, (long) {t_out}, (long) {t_exp});
           test_exit_status = EXIT_FAILURE;
         }
     }