aboutsummaryrefslogtreecommitdiffstats
path: root/FICS
diff options
context:
space:
mode:
Diffstat (limited to 'FICS')
-rw-r--r--FICS/comproc.c4
-rw-r--r--FICS/formula.c2
-rw-r--r--FICS/lists.c2
-rw-r--r--FICS/matchproc.c6
-rw-r--r--FICS/playerdb.c2
-rw-r--r--FICS/ratings.c12
6 files changed, 20 insertions, 8 deletions
diff --git a/FICS/comproc.c b/FICS/comproc.c
index 2bb5a88..d9b7d95 100644
--- a/FICS/comproc.c
+++ b/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;
diff --git a/FICS/formula.c b/FICS/formula.c
index 740012f..af43f0d 100644
--- a/FICS/formula.c
+++ b/FICS/formula.c
@@ -568,7 +568,7 @@ CheckFormula(game *g, int clause, int *i, int op_type, int *result, int eval)
PRIVATE int
ChooseClauses(player *who, char *formula)
{
- int i, which, ret = 0;
+ int i, which = 0, ret = 0;
if (formula == NULL)
return ret;
diff --git a/FICS/lists.c b/FICS/lists.c
index f82a7c9..87198e2 100644
--- a/FICS/lists.c
+++ b/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;
diff --git a/FICS/matchproc.c b/FICS/matchproc.c
index 7288bf0..36f6a4a 100644
--- a/FICS/matchproc.c
+++ b/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
diff --git a/FICS/playerdb.c b/FICS/playerdb.c
index 2fbc975..1ce494f 100644
--- a/FICS/playerdb.c
+++ b/FICS/playerdb.c
@@ -443,6 +443,8 @@ ReadV1PlayerFmt(int p, player *pp, FILE *fp, char *file, int version)
intmax_t wb_tmp[5] = { 0 };
size_t n;
+ bs = ss = ws = ls = bugs = 0;
+
/* XXX: not referenced */
(void) version;
diff --git a/FICS/ratings.c b/FICS/ratings.c
index 48e7e5a..456bfa2 100644
--- a/FICS/ratings.c
+++ b/FICS/ratings.c
@@ -1488,7 +1488,17 @@ UpdateRank(int type, char *addName, statistics *sNew, char *delName)
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;