diff --git a/src/lib/common/bestpath.c b/src/lib/common/bestpath.c index 15633693..4f2c4fb7 100644 --- a/src/lib/common/bestpath.c +++ b/src/lib/common/bestpath.c @@ -105,7 +105,7 @@ static int owned_and_navigable(s_char *, int, int, s_char *, int); ** ________________________________________________________________ */ -s_char *dirchar = "juygbn"; +static char *dirchar = "juygbn"; int dx[6] = { 2, 1, -1, -2, -1, 1 }; int dy[6] = { 0, -1, -1, 0, 1, 1 }; diff --git a/src/lib/common/path.c b/src/lib/common/path.c index 351759e0..3acf7222 100644 --- a/src/lib/common/path.c +++ b/src/lib/common/path.c @@ -72,7 +72,7 @@ static int bp_coord_hash(struct as_coord c); /* We use this for caching neighbors. It never changes except * at reboot time (maybe) so we never need to free it */ -struct sctstr **neighsects = (struct sctstr **)0; +static struct sctstr **neighsects; static s_char * bp_init(void) diff --git a/src/lib/player/login.c b/src/lib/player/login.c index e829206e..dd7d5a38 100644 --- a/src/lib/player/login.c +++ b/src/lib/player/login.c @@ -359,7 +359,7 @@ quit_cmd(void) return RET_OK; } -struct cmndstr login_coms[] = { +static struct cmndstr login_coms[] = { {"client client-id...", 0, client_cmd, 0, 0}, {"coun country", 0, coun_cmd, 0, 0}, {"kill", 0, kill_cmd, 0, 0}, diff --git a/src/lib/subs/show.c b/src/lib/subs/show.c index d25989fb..5291a0b6 100644 --- a/src/lib/subs/show.c +++ b/src/lib/subs/show.c @@ -59,8 +59,13 @@ struct look_list { struct mchrstr *mp; } l_u; int tech; -} lookup_list[200]; /* Change this if there are ever more than 200 planes, ships - or land units. */ +}; + +/* + * Change this if there are ever more than 200 ships, plane or land + * unit types. + */ +static struct look_list lookup_list[200]; static int lookup_list_cnt = 0; static void diff --git a/src/lib/update/finish.c b/src/lib/update/finish.c index 0ba35506..799f795e 100644 --- a/src/lib/update/finish.c +++ b/src/lib/update/finish.c @@ -56,7 +56,7 @@ struct distinfo { /* This is our global buffer of distribution pointers. Note that * We only malloc this once, and never again (until reboot time * of course :) ) We do clear it each and every time. */ -struct distinfo *g_distptrs = (struct distinfo *)0; +static struct distinfo *g_distptrs; /* Note that even though we malloc and save the path, it is never * used. Thus, this option. If you want to malloc and save every diff --git a/src/lib/update/nat.c b/src/lib/update/nat.c index 12d61325..746a43f6 100644 --- a/src/lib/update/nat.c +++ b/src/lib/update/nat.c @@ -72,8 +72,8 @@ static void share_incr(double *, double *); * They are changed later in the limit_level routine. */ /*tech res edu hap */ -float level_easy[4] = { 0.75, 0.75, 5.00, 5.00 }; -float level_log[4] = { 1.75, 2.00, 4.00, 6.00 }; +static float level_easy[4] = { 0.75, 0.75, 5.00, 5.00 }; +static float level_log[4] = { 1.75, 2.00, 4.00, 6.00 }; float levels[MAXNOC][4]; diff --git a/src/lib/update/produce.c b/src/lib/update/produce.c index bb533003..f0bb792a 100644 --- a/src/lib/update/produce.c +++ b/src/lib/update/produce.c @@ -49,8 +49,9 @@ static void materials_charge(struct pchrstr *, short *, int); static int materials_cost(struct pchrstr *, short *, int *); -s_char *levelnames[] = - { "Technology", "Research", "Education", "Happiness" }; +static char *levelnames[] = { + "Technology", "Research", "Education", "Happiness" +}; int produce(struct natstr *np, struct sctstr *sp, short *vec, int work,