From: Marco Costalba Date: Tue, 12 May 2009 10:10:40 +0000 (+0200) Subject: Fix a warning un using anonymous structs X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=9c428afb6dd0dcba2aa4e2a367a6b35c6f335be0;ds=inline Fix a warning un using anonymous structs No functional and no binary change. Signed-off-by: Marco Costalba --- diff --git a/src/bitboard.cpp b/src/bitboard.cpp index b60f54bd..474e321c 100644 --- a/src/bitboard.cpp +++ b/src/bitboard.cpp @@ -302,7 +302,7 @@ union b_union { struct { uint32_t l; uint32_t h; - }; + } dw; }; // WARNING: Needs -fno-strict-aliasing compiler option @@ -313,15 +313,15 @@ Square pop_1st_bit(Bitboard *bb) { u.b = *bb; - if (u.l) + if (u.dw.l) { - b = u.l; + b = u.dw.l; *((uint32_t*)bb) = b & (b - 1); b ^= (b - 1); } else { - b = u.h; + b = u.dw.h; *((uint32_t*)bb+1) = b & (b - 1); // Little endian only? b = ~(b ^ (b - 1)); }