From f8f19da2c9779da68c2075dcb7764ae3b0fe4da4 Mon Sep 17 00:00:00 2001 From: Fabian Groffen Date: Sat, 7 Apr 2007 16:20:14 -0700 Subject: [PATCH] Fix compiler aliasing warnings --- ChangeLog | 9 +++++++++ imap/message.c | 11 ++++++----- muttlib.c | 3 ++- 3 files changed, 17 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index fa99e92f..c7c5ca36 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +2007-04-07 16:13 -0700 Fabian Groffen (779befaca281) + + * hcache.c: Fix compiler warnings + +2007-04-07 16:05 -0700 Jukka Salmi (ef35baf2a2d0) + + * configure.ac: Fix BDB autoconf buglet introduced in + [3638701db407] + 2007-04-07 15:21 -0700 Michael Elkins (70e637e40943) * enter.c: add "|" to the list of shell chars diff --git a/imap/message.c b/imap/message.c index 8e4e0fcd..2b8f2c46 100644 --- a/imap/message.c +++ b/imap/message.c @@ -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; } diff --git a/muttlib.c b/muttlib.c index 16e55f10..3793ba94 100644 --- 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); -- 2.49.0