* tests/test-sameacls.c (main): AIX 7.3’s aclx_* APIs want char *
parameters, not char const *.  Change arguments accordingly.  This
pacifies IBM Open XL C/C++ for AIX 17.1.1 (5725-C72, 5765-J18),
version 17.1.1.2, clang version 15.0.0 (build 3948f09) with
-Wincompatible-pointer-types-discards-qualifiers.
---
 ChangeLog             | 9 +++++++++
 tests/test-sameacls.c | 8 ++++----
 2 files changed, 13 insertions(+), 4 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 19acb732d8..33c3f11184 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2026-08-15  Paul Eggert  <[email protected]>
+
+       acl-tests: fix AIX 7.3 aclx_* constness
+       * tests/test-sameacls.c (main): AIX 7.3’s aclx_* APIs want char *
+       parameters, not char const *.  Change arguments accordingly.  This
+       pacifies IBM Open XL C/C++ for AIX 17.1.1 (5725-C72, 5765-J18),
+       version 17.1.1.2, clang version 15.0.0 (build 3948f09) with
+       -Wincompatible-pointer-types-discards-qualifiers.
+
 2026-08-15  Bruno Haible  <[email protected]>
 
        tests: Support CC="clang -flto -fsanitize=cfi -fvisibility=hidden".
diff --git a/tests/test-sameacls.c b/tests/test-sameacls.c
index 5892769f98..ac885bef8a 100644
--- a/tests/test-sameacls.c
+++ b/tests/test-sameacls.c
@@ -543,7 +543,7 @@ main (int argc, char *argv[])
   /* The docs say that type1 being 0 is equivalent to ACL_ANY, but it is not
      true, in AIX 5.3.  */
   type1.u64 = ACL_ANY;
-  if (aclx_get (file1, 0, &type1, acl1, &aclsize1, &mode1) < 0)
+  if (aclx_get (argv[1], 0, &type1, acl1, &aclsize1, &mode1) < 0)
     {
       if (errno == ENOSYS)
         text1[0] = '\0';
@@ -555,7 +555,7 @@ main (int argc, char *argv[])
         }
     }
   else
-    if (aclx_printStr (text1, &textsize1, acl1, aclsize1, type1, file1, 0) < 0)
+    if (aclx_printStr (text1, &textsize1, acl1, aclsize1, type1, argv[1], 0) < 
0)
       {
         fprintf (stderr, "cannot convert the ACLs of file %s to text\n", 
file1);
         fflush (stderr);
@@ -565,7 +565,7 @@ main (int argc, char *argv[])
   /* The docs say that type2 being 0 is equivalent to ACL_ANY, but it is not
      true, in AIX 5.3.  */
   type2.u64 = ACL_ANY;
-  if (aclx_get (file2, 0, &type2, acl2, &aclsize2, &mode2) < 0)
+  if (aclx_get (argv[2], 0, &type2, acl2, &aclsize2, &mode2) < 0)
     {
       if (errno == ENOSYS)
         text2[0] = '\0';
@@ -577,7 +577,7 @@ main (int argc, char *argv[])
         }
     }
   else
-    if (aclx_printStr (text2, &textsize2, acl2, aclsize2, type2, file2, 0) < 0)
+    if (aclx_printStr (text2, &textsize2, acl2, aclsize2, type2, argv[2], 0) < 
0)
       {
         fprintf (stderr, "cannot convert the ACLs of file %s to text\n", 
file2);
         fflush (stderr);
-- 
2.55.0


Reply via email to