X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=gnushogi%2Fcommondsp.c;h=1950b42864273caf5edc3b65424aaa837204ee03;hb=1dbab3b37f5cda14a870156b1fa927ab1853266c;hp=5f5b5bf83accf12591438f20e3260145a570b143;hpb=dfb85f9c229657e1047d9aa9a478a49fb4b4b37d;p=gnushogi.git diff --git a/gnushogi/commondsp.c b/gnushogi/commondsp.c index 5f5b5bf..1950b42 100644 --- a/gnushogi/commondsp.c +++ b/gnushogi/commondsp.c @@ -1420,16 +1420,15 @@ TestPSpeed(short(*f) (short side), unsigned j) static void SetOppTime(char *time) { - int m, t, sec; + int m, t; - sec = 0; t = (int)strtol(time, &time, 10); if (*time == ':') { time++; /* FIXME: sec is parsed but ignored */ - sec = (int)strtol(time, &time, 10); + (void)strtol(time, &time, 10); } m = (int)strtol(time, &time, 10); @@ -1453,16 +1452,15 @@ SetOppTime(char *time) static void SetMachineTime(char *time) { - int m, t, sec; + int m, t; - sec = 0; t = (int)strtol(time, &time, 10); if (*time == ':') { time++; /* FIXME: sec is parsed but ignored */ - sec = (int)strtol(time, &time, 10); + (void)strtol(time, &time, 10); } m = (int)strtol(time, &time, 10); @@ -1735,8 +1733,8 @@ InputCommand(char *command) { SetMachineTime(sx + strlen("time")); } - else if (strcmp(s, "otime") == 0 || - (xboard && strcmp(s, "otim")) == 0) + else if ((strcmp(s, "otime") == 0) || + (xboard && (strcmp(s, "otim")) == 0)) { SetOppTime(sx + strlen("otime")); }