aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--FICS/adminproc.c4
-rw-r--r--FICS/algcheck.c2
-rw-r--r--FICS/makerank.c6
-rw-r--r--FICS/variable.c2
4 files changed, 6 insertions, 8 deletions
diff --git a/FICS/adminproc.c b/FICS/adminproc.c
index 9bc570d..8cbd95b 100644
--- a/FICS/adminproc.c
+++ b/FICS/adminproc.c
@@ -424,11 +424,9 @@ com_anews(int p, param_list param)
PUBLIC int
strcmpwild(char *mainstr, char *searchstr)
{
- int i;
-
if (strlen(mainstr) < strlen(searchstr))
return 1;
- for (i = 0; i < strlen(mainstr); i++) {
+ for (size_t i = 0; i < strlen(mainstr); i++) {
if (searchstr[i] == '*')
return 0;
if (mainstr[i] != searchstr[i])
diff --git a/FICS/algcheck.c b/FICS/algcheck.c
index 1a118ec..da228e5 100644
--- a/FICS/algcheck.c
+++ b/FICS/algcheck.c
@@ -109,7 +109,7 @@ get_move_info(char *str, int *piece, int *ff, int *fr, int *tf, int *tr,
for (i = 0; alg_list[i]; i++) {
lpiece = lff = lfr = ltf = ltr = ALG_UNKNOWN;
- if (strlen(alg_list[i]) != len)
+ if (strlen(alg_list[i]) != (size_t)len)
continue;
for (j = len - 1; j >= 0; j--) {
diff --git a/FICS/makerank.c b/FICS/makerank.c
index 8f091b7..57956ed 100644
--- a/FICS/makerank.c
+++ b/FICS/makerank.c
@@ -28,11 +28,11 @@ GetPlayerInfo(char *fileName, ENTRY *e)
char NameWithCase[30];
char field[20];
char line[100];
- int i, done = 0;
+ int done = 0;
e->computer = 0;
- for (i = 0; i < ARRAY_SIZE(e->r); i++) {
+ for (size_t i = 0; i < ARRAY_SIZE(e->r); i++) {
e->r[i].num = 0;
e->r[i].rating = 0;
}
@@ -187,7 +187,7 @@ SetComputers(int n)
int i = 0;
if (snprintf(line, sizeof line, "sort -f %s", COMPUTER_FILE) >=
- sizeof line) {
+ (int)sizeof line) {
warnx("%s: snprintf truncated", __func__);
return 0;
} else if ((fpComp = popen(line, "r")) == NULL)
diff --git a/FICS/variable.c b/FICS/variable.c
index c8b2d7a..2af9f59 100644
--- a/FICS/variable.c
+++ b/FICS/variable.c
@@ -881,7 +881,7 @@ set_find(char *var)
{
int gotIt = -1;
int i = 0;
- int len = strlen(var);
+ size_t len = strlen(var);
while (variables[i].name) {
if (!strncmp(variables[i].name, var, len)) {