]> git.draconx.ca Git - dxcommon.git/commitdiff
copysym: Fix pointer qualifier mismatch.
authorNick Bowler <nbowler@draconx.ca>
Fri, 16 Jun 2023 04:01:35 +0000 (00:01 -0400)
committerNick Bowler <nbowler@draconx.ca>
Fri, 16 Jun 2023 04:01:35 +0000 (00:01 -0400)
The "const void *" in the search function can't be directly assigned to
the "const char (*)[5]" variable, due to the differently-qualified
pointer target types.  Let's just cast off that qualifier, shall we?

src/copysym.c

index 7de9e982ceb14dffe89e47816dec57db05aa354c..3d72d6aad9f246eb6aa307669fafc289b2a91918 100644 (file)
@@ -22,7 +22,7 @@
 
 static int compar_5arr(const void *key, const void *elem_)
 {
-       const char (*elem)[5] = elem_;
+       const char (*elem)[5] = (void *)elem_;
 
        return strncmp(key, *elem, sizeof *elem);
 }