Skip to content

Commit

Permalink
Fix warning when compiling with MinGW.
Browse files Browse the repository at this point in the history
  • Loading branch information
syzygy1 committed Feb 11, 2018
1 parent eab9d33 commit 1e615f5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 9 deletions.
2 changes: 1 addition & 1 deletion src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ ifeq ($(COMP),mingw)
CC=gcc
endif

CFLAGS += -Wextra -Wshadow
CFLAGS += -Wextra -Wshadow -D__USE_MINGW_ANSI_STDIO=1
LDFLAGS += #-static
endif

Expand Down
2 changes: 1 addition & 1 deletion src/benchmark.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ void benchmark(Pos *current, char *str)

position(&pos, buf);

fprintf(stderr, "\nPosition: %" FMT_Z "u/%" FMT_Z "u\n", ++j, num_fens - num_opts);
fprintf(stderr, "\nPosition: %zu/%zu\n", ++j, num_fens - num_opts);

if (strcmp(limitType, "perft") == 0)
nodes += perft(&pos, Limits.depth * ONE_PLY);
Expand Down
2 changes: 1 addition & 1 deletion src/tt.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ void tt_allocate(size_t mbSize)


failed:
fprintf(stderr, "Failed to allocate %" FMT_Z "uMB for "
fprintf(stderr, "Failed to allocate %zuMB for "
"transposition table.\n", mbSize);
exit(EXIT_FAILURE);
}
Expand Down
6 changes: 0 additions & 6 deletions src/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -434,12 +434,6 @@ extern struct PSQT psqt;
#define min(a,b) ((a) < (b) ? (a) : (b))
#endif

#ifndef __WIN32__
#define FMT_Z "z"
#else
#define FMT_Z "I"
#endif

#ifdef NDEBUG
#define assume(x) do { if (!(x)) __builtin_unreachable(); } while (0)
#else
Expand Down

0 comments on commit 1e615f5

Please sign in to comment.