Module Name: src Committed By: rillig Date: Mon May 16 21:38:46 UTC 2022
Modified Files: src/games/gomoku: main.c Log Message: gomoku: fix remaining lint warnings in -DDEBUG mode The generated code changes since the calculations are now performed with int precision. No functional change since no overflow occurs. To generate a diff of this commit: cvs rdiff -u -r1.35 -r1.36 src/games/gomoku/main.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/games/gomoku/main.c diff -u src/games/gomoku/main.c:1.35 src/games/gomoku/main.c:1.36 --- src/games/gomoku/main.c:1.35 Mon May 16 21:35:39 2022 +++ src/games/gomoku/main.c Mon May 16 21:38:46 2022 @@ -1,4 +1,4 @@ -/* $NetBSD: main.c,v 1.35 2022/05/16 21:35:39 rillig Exp $ */ +/* $NetBSD: main.c,v 1.36 2022/05/16 21:38:46 rillig Exp $ */ /* * Copyright (c) 1994 @@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1994\ #if 0 static char sccsid[] = "@(#)main.c 8.4 (Berkeley) 5/4/95"; #else -__RCSID("$NetBSD: main.c,v 1.35 2022/05/16 21:35:39 rillig Exp $"); +__RCSID("$NetBSD: main.c,v 1.36 2022/05/16 21:38:46 rillig Exp $"); #endif #endif /* not lint */ @@ -449,7 +449,7 @@ top: break; str[-1] = '\0'; sp = &board[s1 = ctos(input + 1)]; - n = (int)((sp->s_frame[d1] - frames) * FAREA); + n = (int)(sp->s_frame[d1] - frames) * FAREA; *str++ = '\0'; break; } @@ -459,7 +459,7 @@ top: for (d2 = 0; d2 < 4; d2++) if (str[-1] == pdir[d2]) break; - n += sp->s_frame[d2] - frames; + n += (int)(sp->s_frame[d2] - frames); debuglog("overlap %s%c,%s%c = %x", stoc(s1), pdir[d1], stoc(s2), pdir[d2], overlap[n]); goto top;