From: H.G. Muller Date: Fri, 26 Apr 2013 09:01:44 +0000 (+0200) Subject: Fix compiler warnings MaxQi X-Git-Tag: 4.8S~1 X-Git-Url: http://winboard.nl/cgi-bin?p=fairymax.git;a=commitdiff_plain;h=5a188e6a93ea98890db4a360ccd2cf1279a65652 Fix compiler warnings MaxQi LoadGame was declared as int rather than void and did not return anything. The return statements in int main did not return a value. --- diff --git a/maxqi.c b/maxqi.c index cb7bc7e..1ee059f 100644 --- a/maxqi.c +++ b/maxqi.c @@ -52,7 +52,7 @@ /* add array for specifying board zones */ /* add zone limiter for each piece */ /* change promotion code to act when crossing river */ -/* remove stalemate code */ +/* remove stalemate code */ /* G) o[] and oo[] made int, to work on big-endian machines */ /***************************************************************************/ @@ -88,9 +88,9 @@ int GetTickCount() // with thanks to Tord gettimeofday(&t, NULL); return t.tv_sec*1000 + t.tv_usec/1000; } -#ifndef INI_FILE -#define INI_FILE "qmax.ini" -#endif +#ifndef INI_FILE +#define INI_FILE "qmax.ini" +#endif #else @@ -399,8 +399,8 @@ void PrintVariants() fclose(f); } - -int LoadGame(char *name) + +void LoadGame(char *name) { int i, j, count=0; char c, buf[80]; static int currentVariant; @@ -531,7 +531,7 @@ int main(int argc, char **argv) continue; } if (!fgets(line, 256, stdin)) - return; + return 1; if (line[0] == '\n') continue; sscanf(line, "%s", command); @@ -583,7 +583,7 @@ int main(int argc, char **argv) } if (!strcmp(command, "quit")) /* exit engine */ - return; + return 0; if (!strcmp(command, "force")) { /* computer plays neither */ Computer = EMPTY;