From eef912bdf8a61db11e2d197a09e877fda54943f8 Mon Sep 17 00:00:00 2001 From: H.G. Muller Date: Tue, 17 Apr 2012 15:45:27 +0200 Subject: [PATCH] Fix warning about signedness Note: the promoChar in ExcludeMoves was explicitly defined to make sure the kludge promoChar = -1 for indicating best move works. But it should be equivalent to casting the promoChar to (signed char) just before the comparison. --- backend.c | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/backend.c b/backend.c index 593398e..af2b247 100644 --- a/backend.c +++ b/backend.c @@ -6192,12 +6192,12 @@ UpdateExcludeHeader (int fromY, int fromX, int toY, int toX, char promoChar, cha } static int -ExcludeOneMove (int fromY, int fromX, int toY, int toX, signed char promoChar, char state) +ExcludeOneMove (int fromY, int fromX, int toY, int toX, char promoChar, char state) { // include or exclude the given move, as specified by state ('+' or '-'), or toggle char buf[MSG_SIZ]; int j, k; ChessMove moveType; - if(promoChar == -1) { // kludge to indicate best move + if((signed char)promoChar == -1) { // kludge to indicate best move if(!ParseOneMove(lastPV[0], currentMove, &moveType, &fromX, &fromY, &toX, &toY, &promoChar)) // get current best move from last PV return 1; // if unparsable, abort } -- 1.7.0.4