commit 2ffe47dbae27450bc859a8df5f3b06ff0f50038f from: Markus Uhlin date: Wed Nov 26 22:59:17 2025 UTC Fixed potentially uninitialized vars commit - fc4866383d1f002ca832dfce8f8abccf9d72bae5 commit + 2ffe47dbae27450bc859a8df5f3b06ff0f50038f blob - 2bb5a88afe2c6e981fd3bc4315242c3c6476bebd blob + d9b7d95930f288419d614fc1ccac82c756d5be75 --- FICS/comproc.c +++ FICS/comproc.c @@ -137,8 +137,8 @@ rscan_news2(FILE *fp, int p, int num) char junk[MAX_LINE_SIZE] = { '\0' }; char *junkp; const char *v_scan_fmt = "%" SCNd64 " " "%9s"; - int64_t lval; - time_t crtime; + int64_t lval = 0; + time_t crtime = 0; if (num == 0) return; blob - 740012f51cb850f4ce67e22f5ff0d752cd31c3e2 blob + af43f0d8a1fbff4d92d3213907c124527b123eda --- FICS/formula.c +++ FICS/formula.c @@ -568,7 +568,7 @@ CheckFormula(game *g, int clause, int *i, int op_type, PRIVATE int ChooseClauses(player *who, char *formula) { - int i, which, ret = 0; + int i, which = 0, ret = 0; if (formula == NULL) return ret; blob - f82a7c91013fc3fa7826be286705c0e50aba1246 blob + 87198e2ce1469698883febfedd12ad2e57dd10d8 --- FICS/lists.c +++ FICS/lists.c @@ -287,7 +287,7 @@ list_addsub(int p, char *list, char *who, int addsub) List *gl; char *listname, *member; char *yourthe, *addrem; - int p1 = -1, connected, loadme, personal, ch; + int p1 = -1, connected = 0, loadme, personal, ch; if ((gl = list_findpartial(p, list, addsub)) == NULL) return COM_OK; blob - 7288bf0ab65626e62f4ddaff30386906ec9c6a18 blob + 36f6a4a3277eb3790abadbd389720711bc04398c --- FICS/matchproc.c +++ FICS/matchproc.c @@ -306,7 +306,7 @@ accept_match(int p, int p1) char board[50] = { '\0' }; char category[50] = { '\0' }; char tmp[100] = { '\0' }; - int bh = 0, pp, pp1; + int bh = 0, pp = 0, pp1 = 0; int g, adjourned, foo, which; int wt, winc, bt, binc, rated, white; pending *pend; @@ -633,7 +633,7 @@ com_match(int p, param_list param) char *colorstr[] = { "", "[black] ", "[white] " }; char *val; int adjourned; // adjourned game? - int bh = 0, pp, pp1; + int bh = 0, pp = 0, pp1 = 0; int binc = -1; // black increment int bt = -1; // black start time int confused = 0; @@ -642,7 +642,7 @@ com_match(int p, param_list param) int pendfrom, pendto; int ppend, p1pend; int rated = -1; // 1 = rated, 0 = unrated - int type; + int type = TYPE_UNTIMED; int white = -1; // 1 = want white, 0 = want black int winc = -1; // white increment int wt = -1; // white start time blob - 2fbc97520258d169922444ff19b0bbb59e1f6b8e blob + 1ce494fb2ee81c872d0d5826be7b07e2d4eb146c --- FICS/playerdb.c +++ FICS/playerdb.c @@ -443,6 +443,8 @@ ReadV1PlayerFmt(int p, player *pp, FILE *fp, char *fil intmax_t wb_tmp[5] = { 0 }; size_t n; + bs = ss = ws = ls = bugs = 0; + /* XXX: not referenced */ (void) version; blob - 48e7e5a27d9190c495965faab6b3ed9ef2d903fd blob + 456bfa2fd2166596f888841bd443740727318480 --- FICS/ratings.c +++ FICS/ratings.c @@ -1488,7 +1488,17 @@ UpdateRank(int type, char *addName, statistics *sNew, char login[MAX_LOGIN_NAME] = { '\0' }; int comp = 0; int fd = -1; - statistics sCur; + statistics sCur = { + .sterr = 0.0, + .num = 0, + .win = 0, + .los = 0, + .dra = 0, + .rating = 0, + .best = 0, + .ltime = 0, + .whenbest = 0, + }; if (GetRankFileName(RankFile, sizeof RankFile, type) < 0) return;