From: Marco Costalba Date: Mon, 27 Feb 2012 19:30:34 +0000 (+0100) Subject: Fix a shift overflow warning X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=c2a68708ef171cd408b0d331acca384e1bb210ec;p=fairystockfish.git Fix a shift overflow warning Visual Studio 11 is worried that shift result could overflow an integer, this is impossible becuase max value of the shift is 4, but compiler cannot know it. No functional change. Signed-off-by: Marco Costalba --- diff --git a/src/position.cpp b/src/position.cpp index 537674c..0ffcc79 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -1520,7 +1520,7 @@ void Position::init() { Bitboard b = cr; while (b) { - Key k = zobCastle[1 << pop_1st_bit(&b)]; + Key k = zobCastle[1ULL << pop_1st_bit(&b)]; zobCastle[cr] ^= k ? k : rk.rand(); } }