diff --git a/src/pyrrhic/tbchess.c b/src/pyrrhic/tbchess.c index 1fae6e5e..32264276 100644 --- a/src/pyrrhic/tbchess.c +++ b/src/pyrrhic/tbchess.c @@ -106,7 +106,7 @@ static uint64_t pyrrhic_pieces_by_type(const PyrrhicPosition *pos, int colour, i static int pyrrhic_char_to_piece_type(char c) { - for (int i = PYRRHIC_PAWN; i <= PYRRHIC_KING; i++) + for (int i = PYRRHIC_PAWN; i <= (int)PYRRHIC_KING; i++) if (c == pyrrhic_piece_to_char[i]) return i; return 0; diff --git a/src/pyrrhic/tbprobe.c b/src/pyrrhic/tbprobe.c index 1719deb0..0d74e994 100644 --- a/src/pyrrhic/tbprobe.c +++ b/src/pyrrhic/tbprobe.c @@ -445,13 +445,13 @@ static void prt_str(const PyrrhicPosition *pos, char *str, int flip) { int color = flip ? PYRRHIC_BLACK : PYRRHIC_WHITE; - for (int pt = PYRRHIC_KING; pt >= PYRRHIC_PAWN; pt--) + for (int pt = PYRRHIC_KING; pt >= (int)PYRRHIC_PAWN; pt--) for (int i = PYRRHIC_POPCOUNT(pyrrhic_pieces_by_type(pos, color, pt)); i > 0; i--) *str++ = pyrrhic_piece_to_char[pt]; *str++ = 'v'; - for (int pt = PYRRHIC_KING; pt >= PYRRHIC_PAWN; pt--) + for (int pt = PYRRHIC_KING; pt >= (int)PYRRHIC_PAWN; pt--) for (int i = PYRRHIC_POPCOUNT(pyrrhic_pieces_by_type(pos, color^1, pt)); i > 0; i--) *str++ = pyrrhic_piece_to_char[pt]; *str++ = 0;