diff options
author | Denys Vlasenko <vda.linux@googlemail.com> | 2013-10-16 14:21:20 +0200 |
---|---|---|
committer | Denys Vlasenko <vda.linux@googlemail.com> | 2013-10-16 14:21:20 +0200 |
commit | 5117eff6f938a6daa269f965a52abc93b49d90d6 (patch) | |
tree | e0cd5ec91a93da075184310cd51f35f11744f453 | |
parent | eba5faec67da1c95cf9616b5deacbea24fbd3998 (diff) | |
download | busybox-5117eff6f938a6daa269f965a52abc93b49d90d6.tar.gz |
Fix some compiler warnings emitted by gcc-4.8.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
-rw-r--r-- | archival/libarchive/bz/compress.c | 12 | ||||
-rw-r--r-- | archival/libarchive/lzo1x_9x.c | 2 | ||||
-rw-r--r-- | debianutils/run_parts.c | 2 | ||||
-rw-r--r-- | networking/ping.c | 2 |
4 files changed, 9 insertions, 9 deletions
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 diff --git a/debianutils/run_parts.c b/debianutils/run_parts.c index 2c2b032be..527fae227 100644 --- a/debianutils/run_parts.c +++ b/debianutils/run_parts.c @@ -59,7 +59,7 @@ struct globals { char **names; int cur; - char *cmd[1]; + char *cmd[2 /* using 1 provokes compiler warning */]; } FIX_ALIASING; #define G (*(struct globals*)&bb_common_bufsiz1) #define names (G.names) diff --git a/networking/ping.c b/networking/ping.c index f27e2143d..5e4771f5a 100644 --- a/networking/ping.c +++ b/networking/ping.c @@ -516,7 +516,7 @@ static void sendping6(int junk UNUSED_PARAM) pkt->icmp6_id = myid; /*if (datalen >= 4)*/ - *(uint32_t*)(&pkt->icmp6_data8[4]) = monotonic_us(); + *(bb__aliased_uint32_t*)(&pkt->icmp6_data8[4]) = monotonic_us(); //TODO? pkt->icmp_cksum = inet_cksum(...); |