From 5117eff6f938a6daa269f965a52abc93b49d90d6 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Wed, 16 Oct 2013 14:21:20 +0200 Subject: Fix some compiler warnings emitted by gcc-4.8.0 Signed-off-by: Denys Vlasenko --- archival/libarchive/bz/compress.c | 12 ++++++------ archival/libarchive/lzo1x_9x.c | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'archival/libarchive') diff --git a/archival/libarchive/bz/compress.c b/archival/libarchive/bz/compress.c index e9f1afdaf..a7dd72d9e 100644 --- a/archival/libarchive/bz/compress.c +++ b/archival/libarchive/bz/compress.c @@ -501,14 +501,14 @@ void sendMTFValues(EState* s) for (i = 0; i < 16; i++) { if (sizeof(long) <= 4) { inUse16 = inUse16*2 + - ((*(uint32_t*)&(s->inUse[i * 16 + 0]) - | *(uint32_t*)&(s->inUse[i * 16 + 4]) - | *(uint32_t*)&(s->inUse[i * 16 + 8]) - | *(uint32_t*)&(s->inUse[i * 16 + 12])) != 0); + ((*(bb__aliased_uint32_t*)&(s->inUse[i * 16 + 0]) + | *(bb__aliased_uint32_t*)&(s->inUse[i * 16 + 4]) + | *(bb__aliased_uint32_t*)&(s->inUse[i * 16 + 8]) + | *(bb__aliased_uint32_t*)&(s->inUse[i * 16 + 12])) != 0); } else { /* Our CPU can do better */ inUse16 = inUse16*2 + - ((*(uint64_t*)&(s->inUse[i * 16 + 0]) - | *(uint64_t*)&(s->inUse[i * 16 + 8])) != 0); + ((*(bb__aliased_uint64_t*)&(s->inUse[i * 16 + 0]) + | *(bb__aliased_uint64_t*)&(s->inUse[i * 16 + 8])) != 0); } } diff --git a/archival/libarchive/lzo1x_9x.c b/archival/libarchive/lzo1x_9x.c index 897132987..3e331984d 100644 --- a/archival/libarchive/lzo1x_9x.c +++ b/archival/libarchive/lzo1x_9x.c @@ -94,7 +94,7 @@ typedef struct { ( ((0x9f5f * ((((b[p]<<5)^b[p+1])<<5) ^ b[p+2])) >> 5) & (SWD_HSIZE-1) ) #if defined(LZO_UNALIGNED_OK_2) -# define HEAD2(b,p) (* (uint16_t *) &(b[p])) +# define HEAD2(b,p) (* (bb__aliased_uint16_t *) &(b[p])) #else # define HEAD2(b,p) (b[p] ^ ((unsigned)b[p+1]<<8)) #endif -- cgit v1.2.3