PR 31882 libctf: test suite incorrect format specifiers
diff --git a/libctf/testsuite/libctf-lookup/struct-iteration.c b/libctf/testsuite/libctf-lookup/struct-iteration.c
index 005aba1..b240864 100644
--- a/libctf/testsuite/libctf-lookup/struct-iteration.c
+++ b/libctf/testsuite/libctf-lookup/struct-iteration.c
@@ -53,7 +53,7 @@
     {
       char *type_name = ctf_type_aname (fp, membtype);
 
-      printf ("next test: %s, offset %lx, has type %lx/%s\n",
+      printf ("next test: %s, offset %zx, has type %lx/%s\n",
 	      name, offset, membtype, type_name);
       free (type_name);
     }
diff --git a/libctf/testsuite/libctf-lookup/unnamed-field-info.c b/libctf/testsuite/libctf-lookup/unnamed-field-info.c
index 9abe8b0..039df64 100644
--- a/libctf/testsuite/libctf-lookup/unnamed-field-info.c
+++ b/libctf/testsuite/libctf-lookup/unnamed-field-info.c
@@ -16,7 +16,7 @@
     goto err;
 
   if (mi.ctm_offset != offset * 8)
-    fprintf (stderr, "field %s inconsistency: offsetof() says %zi bits, CTF says %zi\n",
+    fprintf (stderr, "field %s inconsistency: offsetof() says %zi bits, CTF says %li\n",
 	     name, offset * 8, mi.ctm_offset);
 
   return;