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);
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);
} else {
int min, sec=0, inc, mps;
/* parse regular "level MPS TC INC" command of WB protocol */
- sscanf(sx, "%d %d %d", &mps, &min, &inc) == 3 ||
- sscanf(sx, "%d %d:%d %d", &mps, &min, &sec, &inc);
+ if (sscanf(sx, "%d %d %d", &mps, &min, &inc) != 3)
+ sscanf(sx, "%d %d:%d %d", &mps, &min, &sec, &inc);
TCminutes = min; TCseconds = sec;
TCadd = inc*100; TCmoves = mps ? mps : 50;
MaxResponseTime = 0; TCflag = true;