From: H.G. Muller Date: Tue, 17 Apr 2012 13:45:27 +0000 (+0200) Subject: Fix warning about signedness X-Git-Url: http://winboard.nl/cgi-bin?a=commitdiff_plain;h=eef912bdf8a61db11e2d197a09e877fda54943f8;p=xboard.git 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. --- 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 }