1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 16:53:09 +00:00

Fix a warning un using anonymous structs

No functional and no binary change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2009-05-12 12:10:40 +02:00
parent 27619830d4
commit 9c428afb6d

View file

@ -302,7 +302,7 @@ union b_union {
struct { struct {
uint32_t l; uint32_t l;
uint32_t h; uint32_t h;
}; } dw;
}; };
// WARNING: Needs -fno-strict-aliasing compiler option // WARNING: Needs -fno-strict-aliasing compiler option
@ -313,15 +313,15 @@ Square pop_1st_bit(Bitboard *bb) {
u.b = *bb; u.b = *bb;
if (u.l) if (u.dw.l)
{ {
b = u.l; b = u.dw.l;
*((uint32_t*)bb) = b & (b - 1); *((uint32_t*)bb) = b & (b - 1);
b ^= (b - 1); b ^= (b - 1);
} }
else else
{ {
b = u.h; b = u.dw.h;
*((uint32_t*)bb+1) = b & (b - 1); // Little endian only? *((uint32_t*)bb+1) = b & (b - 1); // Little endian only?
b = ~(b ^ (b - 1)); b = ~(b ^ (b - 1));
} }