Fix some compiler warnings emitted by gcc-4.8.0
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
parent
eba5faec67
commit
5117eff6f9
@ -501,14 +501,14 @@ void sendMTFValues(EState* s)
|
|||||||
for (i = 0; i < 16; i++) {
|
for (i = 0; i < 16; i++) {
|
||||||
if (sizeof(long) <= 4) {
|
if (sizeof(long) <= 4) {
|
||||||
inUse16 = inUse16*2 +
|
inUse16 = inUse16*2 +
|
||||||
((*(uint32_t*)&(s->inUse[i * 16 + 0])
|
((*(bb__aliased_uint32_t*)&(s->inUse[i * 16 + 0])
|
||||||
| *(uint32_t*)&(s->inUse[i * 16 + 4])
|
| *(bb__aliased_uint32_t*)&(s->inUse[i * 16 + 4])
|
||||||
| *(uint32_t*)&(s->inUse[i * 16 + 8])
|
| *(bb__aliased_uint32_t*)&(s->inUse[i * 16 + 8])
|
||||||
| *(uint32_t*)&(s->inUse[i * 16 + 12])) != 0);
|
| *(bb__aliased_uint32_t*)&(s->inUse[i * 16 + 12])) != 0);
|
||||||
} else { /* Our CPU can do better */
|
} else { /* Our CPU can do better */
|
||||||
inUse16 = inUse16*2 +
|
inUse16 = inUse16*2 +
|
||||||
((*(uint64_t*)&(s->inUse[i * 16 + 0])
|
((*(bb__aliased_uint64_t*)&(s->inUse[i * 16 + 0])
|
||||||
| *(uint64_t*)&(s->inUse[i * 16 + 8])) != 0);
|
| *(bb__aliased_uint64_t*)&(s->inUse[i * 16 + 8])) != 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -94,7 +94,7 @@ typedef struct {
|
|||||||
( ((0x9f5f * ((((b[p]<<5)^b[p+1])<<5) ^ b[p+2])) >> 5) & (SWD_HSIZE-1) )
|
( ((0x9f5f * ((((b[p]<<5)^b[p+1])<<5) ^ b[p+2])) >> 5) & (SWD_HSIZE-1) )
|
||||||
|
|
||||||
#if defined(LZO_UNALIGNED_OK_2)
|
#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
|
#else
|
||||||
# define HEAD2(b,p) (b[p] ^ ((unsigned)b[p+1]<<8))
|
# define HEAD2(b,p) (b[p] ^ ((unsigned)b[p+1]<<8))
|
||||||
#endif
|
#endif
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
struct globals {
|
struct globals {
|
||||||
char **names;
|
char **names;
|
||||||
int cur;
|
int cur;
|
||||||
char *cmd[1];
|
char *cmd[2 /* using 1 provokes compiler warning */];
|
||||||
} FIX_ALIASING;
|
} FIX_ALIASING;
|
||||||
#define G (*(struct globals*)&bb_common_bufsiz1)
|
#define G (*(struct globals*)&bb_common_bufsiz1)
|
||||||
#define names (G.names)
|
#define names (G.names)
|
||||||
|
@ -516,7 +516,7 @@ static void sendping6(int junk UNUSED_PARAM)
|
|||||||
pkt->icmp6_id = myid;
|
pkt->icmp6_id = myid;
|
||||||
|
|
||||||
/*if (datalen >= 4)*/
|
/*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(...);
|
//TODO? pkt->icmp_cksum = inet_cksum(...);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user