aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMarkus Uhlin <markus@nifty-networks.net>2026-04-27 00:00:57 +0200
committerMarkus Uhlin <markus@nifty-networks.net>2026-04-27 00:00:57 +0200
commit47cb899ab91a8049fcdc720deca7ee2f7a8fad3b (patch)
tree5538643893ce22c54699d9bf259316179c0987ef
parenta63e71fc7d1511753e88666b6d0bc879bb0006ed (diff)
Discarded fclose() return values
-rw-r--r--FICS/makerank.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/FICS/makerank.c b/FICS/makerank.c
index 11a0b93..1a0dd01 100644
--- a/FICS/makerank.c
+++ b/FICS/makerank.c
@@ -45,7 +45,7 @@ GetPlayerInfo(char *fileName, ENTRY *e)
fgets(line, sizeof line, fp) == NULL ||
feof(fp)) {
if (fp)
- fclose(fp);
+ (void) fclose(fp);
return 0;
}
@@ -55,7 +55,7 @@ GetPlayerInfo(char *fileName, ENTRY *e)
if (fgets(line, sizeof line, fp) == NULL ||
sscanf(line, "%19s", e->name) != 1) {
warnx("%s: fgets() or sscanf() error", __func__);
- fclose(fp);
+ (void) fclose(fp);
return 0;
} else if (fgets(line, sizeof line, fp) == NULL ||
fgets(line, sizeof line, fp) == NULL ||
@@ -78,7 +78,7 @@ GetPlayerInfo(char *fileName, ENTRY *e)
&(e->r[3].rating)) != 8) {
fprintf(stderr, "OOPS: couldn't parse player file %s."
"\n", fileName);
- fclose(fp);
+ (void) fclose(fp);
return 0;
}
@@ -92,7 +92,7 @@ GetPlayerInfo(char *fileName, ENTRY *e)
if (sscanf(line, "%19s", field) != 1) {
warnx("%s: sscanf() error", __func__);
- fclose(fp);
+ (void) fclose(fp);
return 0;
}
@@ -100,7 +100,7 @@ GetPlayerInfo(char *fileName, ENTRY *e)
if (sscanf(line, "%*s %29s", NameWithCase) != 1) {
warnx("%s: expected name with case",
__func__);
- fclose(fp);
+ (void) fclose(fp);
return 0;
}