From b5232e2da3fc773a1a362e3dc19295bb3448ad79 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Sat, 1 Nov 2008 12:52:40 +0100 Subject: [PATCH] Fix a couple of gcc warnings in position.cpp Signed-off-by: Marco Costalba --- src/position.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/position.cpp b/src/position.cpp index 71a30746..958a9397 100644 --- a/src/position.cpp +++ b/src/position.cpp @@ -410,6 +410,7 @@ bool Position::piece_attacks_square(Square f, Square t) const { case WR: case BR: return piece_attacks_square(f, t); case WQ: case BQ: return piece_attacks_square(f, t); case WK: case BK: return piece_attacks_square(f, t); + default: break; } return false; } @@ -437,6 +438,7 @@ bool Position::move_attacks_square(Move m, Square s) const { case WR: case BR: return piece_attacks_square(t, s); case WQ: case BQ: return piece_attacks_square(t, s); case WK: case BK: return piece_attacks_square(t, s); + default: break; } return false; } @@ -643,6 +645,9 @@ bool Position::move_is_check(Move m, Bitboard dcCandidates) const { return bit_is_set(rook_attacks_bb(rto, b), ksq); } return false; + + default: // NO_PIECE_TYPE + break; } assert(false); return false; @@ -1113,7 +1118,7 @@ void Position::do_promotion_move(Move m, UndoInfo &u) { castleRights &= castleRightsMask[to]; key ^= zobCastle[castleRights]; - // Reset rule 50 counter + // Reset rule 50 counter rule50 = 0; // Update checkers BB -- 2.39.2