Date: Fri, 6 Dec 2019 12:55:23 +0000 (UTC) From: Piotr Kubaj <pkubaj@FreeBSD.org> To: ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org Subject: svn commit: r519137 - head/games/scid/files Message-ID: <201912061255.xB6CtNZY011295@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: pkubaj Date: Fri Dec 6 12:55:23 2019 New Revision: 519137 URL: https://svnweb.freebsd.org/changeset/ports/519137 Log: games/scid: fix build on arm and powerpc Explicitly set signed char for variables that are negative to prevent signed/unsigned issue on arm and powerpc. PR: 242141 Approved by: bsd@volki.at (maintainer), linimon (mentor) Differential Revision: https://reviews.freebsd.org/D22581 Added: head/games/scid/files/patch-src_fastgame.h (contents, props changed) Added: head/games/scid/files/patch-src_fastgame.h ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ head/games/scid/files/patch-src_fastgame.h Fri Dec 6 12:55:23 2019 (r519137) @@ -0,0 +1,20 @@ +--- src/fastgame.h.orig 2019-11-21 14:15:35 UTC ++++ src/fastgame.h +@@ -433,7 +433,7 @@ class FastGame { (private) + + static inline squareT decodeKing (squareT from, byte val) { + ASSERT (val <= 8); +- static const char sqdiff[] = { 0, -9, -8, -7, -1, 1, 7, 8, 9}; ++ static const signed char sqdiff[] = { 0, -9, -8, -7, -1, 1, 7, 8, 9}; + return 0x3F & (from + sqdiff[val]); + } + static inline squareT decodeQueen2byte (byte val) { +@@ -447,7 +447,7 @@ class FastGame { (private) + } + static inline squareT decodeKnight (squareT from, byte val) { + ASSERT (val <= 16); +- static const char sqdiff[] = { 0, -17, -15, -10, -6, 6, 10, 15, 17, 0, 0, 0, 0, 0, 0, 0 }; ++ static const signed char sqdiff[] = { 0, -17, -15, -10, -6, 6, 10, 15, 17, 0, 0, 0, 0, 0, 0, 0 }; + return 0x3F & (from + sqdiff[val]); + } + static inline squareT decodeRook (squareT from, byte val) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201912061255.xB6CtNZY011295>