diff options
author | Markus Uhlin <markus@nifty-networks.net> | 2023-12-23 03:49:44 +0100 |
---|---|---|
committer | Markus Uhlin <markus@nifty-networks.net> | 2023-12-23 03:49:44 +0100 |
commit | f169cfac320f02678e0a3fc8e8045797c983c56c (patch) | |
tree | 3234aa85df557dd57d37de1353268c7c453fe325 | |
parent | afd96d5939efc254dec1a64a7f712066f755cb3f (diff) |
Attempt to fix clang compiler warnings
-rw-r--r-- | FICS/gamedb.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/FICS/gamedb.c b/FICS/gamedb.c index 212ad14..c4deaa7 100644 --- a/FICS/gamedb.c +++ b/FICS/gamedb.c @@ -1012,6 +1012,8 @@ int ReadV1Moves(game *g, FILE * fp) int ReadV1GameFmt(game *g, FILE *fp, char *file, int version) { + long int lval; + fscanf(fp, "%s %s", g->white_name, g->black_name); fscanf(fp, "%d %d", &g->white_rating, &g->black_rating); fscanf(fp, "%d %d %d %d", @@ -1023,7 +1025,9 @@ ReadV1GameFmt(game *g, FILE *fp, char *file, int version) if (version < 3 && !g->bInitTime) g->bInitTime = g->wInitTime; - fscanf(fp, "%lx", &g->timeOfStart); + fscanf(fp, "%ld", &lval); + g->timeOfStart = lval; + fscanf(fp, "%d %d", &g->wTime, &g->bTime); if (version > 1) @@ -1168,16 +1172,19 @@ PUBLIC int game_delete(int wp, int bp) void WriteGameFile(FILE *fp, int g) { - game *gg = &garray[g]; - player *bp = &parray[gg->black]; - player *wp = &parray[gg->white]; + game *gg = &garray[g]; + long int lval; + player *bp = &parray[gg->black]; + player *wp = &parray[gg->white]; fprintf(fp, "v %d\n", GAMEFILE_VERSION); fprintf(fp, "%s %s\n", wp->name, bp->name); fprintf(fp, "%d %d\n", gg->white_rating, gg->black_rating); fprintf(fp, "%d %d %d %d\n", gg->wInitTime, gg->wIncrement, gg->bInitTime, gg->bIncrement); - fprintf(fp, "%lx\n", gg->timeOfStart); + + lval = gg->timeOfStart; + fprintf(fp, "%ld\n", lval); #ifdef TIMESEAL fprintf(fp, "%d %d\n", |