]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix "warning: cast from 'const void *' to 'const char **' drops const qualifier".
authorBruno Haible <bruno@clisp.org>
Sun, 6 Sep 2020 20:13:05 +0000 (22:13 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 9 Oct 2022 07:30:42 +0000 (09:30 +0200)
* gettext-runtime/src/envsubst.c (cmp_string): Add 'const'.

gettext-runtime/src/envsubst.c

index ffe4ce79d4ddd0212a65dc677b738c933c04ca75..15376176712ba851e50393eaf5a00845053439b4 100644 (file)
@@ -343,8 +343,8 @@ string_list_append (string_list_ty *slp, const char *s)
 static int
 cmp_string (const void *pstr1, const void *pstr2)
 {
-  const char *str1 = *(const char **)pstr1;
-  const char *str2 = *(const char **)pstr2;
+  const char *str1 = *(const char * const *)pstr1;
+  const char *str2 = *(const char * const *)pstr2;
 
   return strcmp (str1, str2);
 }