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:
parent
27619830d4
commit
9c428afb6d
1 changed files with 4 additions and 4 deletions
|
@ -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));
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue