]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Avoid a gcc warning related to -fstrict-aliasing.
authorBruno Haible <bruno@clisp.org>
Tue, 21 Oct 2003 20:23:03 +0000 (20:23 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:11:05 +0000 (12:11 +0200)
gettext-tools/src/ChangeLog
gettext-tools/src/message.c

index ac0ee237c93cab9a266acf9409f91e529a3c9a81..57270a612bfd9e1e4b5db7642a9b34e6180a42a1 100644 (file)
@@ -1,3 +1,8 @@
+2003-10-21  Bruno Haible  <bruno@clisp.org>
+
+       * message.c (message_list_search): Avoid casting a pointer to a local
+       variable; it violated strict aliasing.
+
 2003-10-21  Bruno Haible  <bruno@clisp.org>
 
        * write-java.c (mkdir): Redefine on mingw.
index 4ed13091533f60a6cb17d453c9ee631e7f7fdbb0..c82ed412cf7e22afd961f0a32cd0e0805337734d 100644 (file)
@@ -331,12 +331,12 @@ message_list_search (message_list_ty *mlp, const char *msgid)
 {
   if (mlp->use_hashtable)
     {
-      message_ty *mp;
+      void *htable_value;
 
-      if (find_entry (&mlp->htable, msgid, strlen (msgid) + 1, (void **) &mp))
+      if (find_entry (&mlp->htable, msgid, strlen (msgid) + 1, &htable_value))
        return NULL;
       else
-       return mp;
+       return (message_ty *) htable_value;
     }
   else
     {