]> Savannah Git Hosting - gnulib.git/commitdiff
hamt tests: Fix compilation error with AIX xlc.
authorBruno Haible <bruno@clisp.org>
Fri, 24 Dec 2021 18:31:27 +0000 (19:31 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 24 Dec 2021 18:31:27 +0000 (19:31 +0100)
* tests/test-hamt.c (test_iterator): Don't use compound initializer.

ChangeLog
tests/test-hamt.c

index 32174c29e0039cde8b3f74e257f7a6c0959933c3..45bc226680ad22d7a1d1d7e515e244a28c599f6c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2021-12-24  Bruno Haible  <bruno@clisp.org>
+
+       hamt tests: Fix compilation error with AIX xlc.
+       * tests/test-hamt.c (test_iterator): Don't use compound initializer.
+
 2021-12-24  Bruno Haible  <bruno@clisp.org>
 
        strerrorname_np: Fix compilation error on IRIX.
index 882bf0fc7669a445daec9ba37da6e48fc30cc064..5b953741ca786778143cf1cf09754535c40314ff 100644 (file)
@@ -348,7 +348,8 @@ test_iterator (void)
 {
   Hamt *hamt = test_hamt_create ();
   ASSERT (insert_values (&hamt, 10, val_array1, true) == 10);
-  Hamt_iterator iter [1] = {hamt_iterator (hamt)};
+  Hamt_iterator iter[1];
+  iter[0] = hamt_iterator (hamt);
   size_t cnt = 0;
   bool found [10] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0};
   Hamt_entry *p;