]> granicus.if.org Git - mutt/commitdiff
Fix compiler aliasing warnings
authorFabian Groffen <grobian@gentoo.org>
Sat, 7 Apr 2007 23:20:14 +0000 (16:20 -0700)
committerFabian Groffen <grobian@gentoo.org>
Sat, 7 Apr 2007 23:20:14 +0000 (16:20 -0700)
ChangeLog
imap/message.c
muttlib.c

index fa99e92f1223e6d3739313e6acc7fca1c1173886..c7c5ca36c172d7e389789260609584aa4949d09f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2007-04-07 16:13 -0700  Fabian Groffen  <grobian@gentoo.org>  (779befaca281)
+
+       * hcache.c: Fix compiler warnings
+
+2007-04-07 16:05 -0700  Jukka Salmi  <jukka@salmi.ch>  (ef35baf2a2d0)
+
+       * configure.ac: Fix BDB autoconf buglet introduced in
+       [3638701db407]
+
 2007-04-07 15:21 -0700  Michael Elkins  <me@mutt.org>  (70e637e40943)
 
        * enter.c: add "|" to the list of shell chars
index 8e4e0fcd2fec4e7d4c712c3edb58c4fe365944b4..2b8f2c46c6fea7176869e0c6546c3e6cabb71f6d 100644 (file)
@@ -154,7 +154,8 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
         rc = imap_cmd_step (idata);
         if (rc != IMAP_CMD_CONTINUE)
        {
-         imap_free_header_data ((void**) &h.data);
+          /* suppress GCC aliasing warning */
+         imap_free_header_data ((void**) (void*) &h.data);
           break;
        }
 
@@ -162,7 +163,7 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
           continue;
         else if (mfhrc < 0)
        {
-         imap_free_header_data ((void**) &h.data);
+         imap_free_header_data ((void**) (void*) &h.data);
           break;
        }
 
@@ -189,7 +190,7 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
        else
          /* bad header in the cache, we'll have to refetch.
           * TODO: consider the possibility of a holey cache. */
-          imap_free_header_data((void**) &h.data);
+          imap_free_header_data((void**) (void*) &h.data);
       }
       while (rc != IMAP_CMD_OK && mfhrc == -1);
       if (rc == IMAP_CMD_OK)
@@ -197,7 +198,7 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
       if ((mfhrc < -1) || ((rc != IMAP_CMD_CONTINUE) && (rc != IMAP_CMD_OK)))
       {
         if (h.data)
-          imap_free_header_data ((void**) &h.data);
+          imap_free_header_data ((void**) (void*) &h.data);
         fclose (fp);
         return -1;
       }
@@ -298,7 +299,7 @@ int imap_read_headers (IMAP_DATA* idata, int msgbegin, int msgend)
     if ((mfhrc < -1) || ((rc != IMAP_CMD_CONTINUE) && (rc != IMAP_CMD_OK)))
     {
       if (h.data)
-        imap_free_header_data ((void**) &h.data);
+        imap_free_header_data ((void**) (void*) &h.data);
       fclose (fp);
       return -1;
     }
index 16e55f1083e1b66c468848a5ec5410e1cf713050..3793ba94b26c9b2444e0566737fd742ff85d7653 100644 (file)
--- a/muttlib.c
+++ b/muttlib.c
@@ -1602,7 +1602,8 @@ void mutt_buffer_add (BUFFER* buf, const char* s, size_t len)
   {
     offset = buf->dptr - buf->data;
     buf->dsize += len < 128 ? 128 : len + 1;
-    safe_realloc ((void**) &buf->data, buf->dsize);
+    /* suppress compiler aliasing warning */
+    safe_realloc ((void**) (void*) &buf->data, buf->dsize);
     buf->dptr = buf->data + offset;
   }
   memcpy (buf->dptr, s, len);