From 98e8d2445213432c65ae48cfa76c863aae1139e7 Mon Sep 17 00:00:00 2001 From: Scott Gasch Date: Wed, 3 Oct 2018 20:38:03 -0700 Subject: Update codebase to remove clang warnings (and a couple of legit errors it found) --- src/chess.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/chess.h') diff --git a/src/chess.h b/src/chess.h index c815701..2bfec4d 100755 --- a/src/chess.h +++ b/src/chess.h @@ -1233,8 +1233,8 @@ _assert(CHAR *szFile, ULONG uLine); RANK1(c) || \ FILEA(c) || \ FILEH(c)) -#define CORNER_DISTANCE(c) (MAX(MIN((ULONG)abs(RANK(c) - 7), RANK(c)),\ - MIN((ULONG)abs(FILE(c) - 7), FILE(c)))) +#define CORNER_DISTANCE(c) (MAX(MIN((ULONG)(RANK(c) - 7), RANK(c)),\ + MIN((ULONG)(FILE(c) - 7), FILE(c)))) #define IN_CORNER(c) (((c) == A8) || \ ((c) == A1) || \ ((c) == H8) || \ -- cgit v1.3