if prototype is declared static make function static to match

Today, a compiler was encountered that considered it an error
to have the prototype declared static and the function body
not
This commit is contained in:
nhmall
2019-07-13 00:17:23 -04:00
parent 2f3da35c68
commit 638d9f9363
18 changed files with 40 additions and 38 deletions
+1 -1
View File
@@ -876,7 +876,7 @@ enum earlyarg e_arg;
* optimization so that display output * optimization so that display output
* can be debugged without buffering. * can be debugged without buffering.
*/ */
void STATIC_OVL void
debug_fields(opts) debug_fields(opts)
const char *opts; const char *opts;
{ {
+3 -3
View File
@@ -1611,7 +1611,7 @@ int x,y;
&& is_valid_jump_pos(x, y, jumping_is_magic, FALSE)); && is_valid_jump_pos(x, y, jumping_is_magic, FALSE));
} }
void STATIC_OVL void
display_jump_positions(state) display_jump_positions(state)
int state; int state;
{ {
@@ -2870,7 +2870,7 @@ static const char
cant_reach[] = "can't reach that spot from here."; cant_reach[] = "can't reach that spot from here.";
/* find pos of monster in range, if only one monster */ /* find pos of monster in range, if only one monster */
boolean STATIC_OVL boolean
find_poleable_mon(pos, min_range, max_range) find_poleable_mon(pos, min_range, max_range)
coord *pos; coord *pos;
int min_range, max_range; int min_range, max_range;
@@ -2926,7 +2926,7 @@ int x, y;
&& distu(x, y) <= polearm_range_max); && distu(x, y) <= polearm_range_max);
} }
void STATIC_OVL void
display_polearm_positions(state) display_polearm_positions(state)
int state; int state;
{ {
+2 -2
View File
@@ -561,7 +561,7 @@ static long bl_hilite_moves = 0L;
static unsigned long cond_hilites[BL_ATTCLR_MAX]; static unsigned long cond_hilites[BL_ATTCLR_MAX];
static int now_or_before_idx = 0; /* 0..1 for array[2][] first index */ static int now_or_before_idx = 0; /* 0..1 for array[2][] first index */
void STATIC_OVL void
bot_via_windowport() bot_via_windowport()
{ {
char buf[BUFSZ]; char buf[BUFSZ];
@@ -2812,7 +2812,7 @@ status_hilite_linestr_gather()
} }
char * STATIC_OVL char *
status_hilite2str(hl) status_hilite2str(hl)
struct hilite_s *hl; struct hilite_s *hl;
{ {
+1 -1
View File
@@ -2576,7 +2576,7 @@ int final;
} }
/* attributes: intrinsics and the like, other non-obvious capabilities */ /* attributes: intrinsics and the like, other non-obvious capabilities */
void STATIC_OVL void
attributes_enlightenment(unused_mode, final) attributes_enlightenment(unused_mode, final)
int unused_mode UNUSED; int unused_mode UNUSED;
int final; int final;
+1 -1
View File
@@ -897,7 +897,7 @@ xchar x, y;
} }
} }
int STATIC_OVL int
tether_glyph(x, y) tether_glyph(x, y)
int x, y; int x, y;
{ {
+2 -2
View File
@@ -1343,7 +1343,7 @@ domove()
domove_attempting = 0L; domove_attempting = 0L;
} }
void STATIC_OVL void
domove_core() domove_core()
{ {
register struct monst *mtmp; register struct monst *mtmp;
@@ -1940,7 +1940,7 @@ domove_core()
} }
} }
void STATIC_OVL void
maybe_smudge_engr(x1,y1,x2,y2) maybe_smudge_engr(x1,y1,x2,y2)
int x1, y1, x2, y2; int x1, y1, x2, y2;
{ {
+2
View File
@@ -19,7 +19,9 @@
#define ISAAC64_MASK ((uint64_t)0xFFFFFFFFFFFFFFFFULL) #define ISAAC64_MASK ((uint64_t)0xFFFFFFFFFFFFFFFFULL)
#if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L) #if (defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
#if !defined(HAS_INLINE)
#define HAS_INLINE #define HAS_INLINE
#endif
#else #else
# if (defined(__GNUC__) && __GNUC__ >= 2 && !defined(inline)) # if (defined(__GNUC__) && __GNUC__ >= 2 && !defined(inline))
# define inline __inline__ # define inline __inline__
+1 -1
View File
@@ -1033,7 +1033,7 @@ newmextra()
return mextra; return mextra;
} }
boolean STATIC_OVL boolean
makemon_rnd_goodpos(mon, gpflags, cc) makemon_rnd_goodpos(mon, gpflags, cc)
struct monst *mon; struct monst *mon;
unsigned gpflags; unsigned gpflags;
+4 -4
View File
@@ -619,7 +619,7 @@ fixup_special()
num_lregions = 0; num_lregions = 0;
} }
void STATIC_OVL void
check_ransacked(s) check_ransacked(s)
char *s; char *s;
{ {
@@ -630,7 +630,7 @@ char *s;
#define ORC_LEADER 1 #define ORC_LEADER 1
static const char *orcfruit[] = { "paddle cactus", "dwarven root" }; static const char *orcfruit[] = { "paddle cactus", "dwarven root" };
void STATIC_OVL void
migrate_orc(mtmp, mflags) migrate_orc(mtmp, mflags)
struct monst *mtmp; struct monst *mtmp;
unsigned long mflags; unsigned long mflags;
@@ -695,7 +695,7 @@ struct monst *mtmp;
add_to_minv(mtmp, otmp); add_to_minv(mtmp, otmp);
} }
} }
void STATIC_OVL void
migr_booty_item(otyp, gang) migr_booty_item(otyp, gang)
int otyp; int otyp;
const char *gang; const char *gang;
@@ -716,7 +716,7 @@ const char *gang;
} }
} }
void STATIC_OVL void
stolen_booty(VOID_ARGS) stolen_booty(VOID_ARGS)
{ {
char *gang, gang_name[BUFSZ]; char *gang, gang_name[BUFSZ];
+2 -2
View File
@@ -45,7 +45,7 @@ const char *warnings[] = {
#endif /* 0 */ #endif /* 0 */
void STATIC_OVL void
sanity_check_single_mon(mtmp, chk_geno, msg) sanity_check_single_mon(mtmp, chk_geno, msg)
struct monst *mtmp; struct monst *mtmp;
boolean chk_geno; boolean chk_geno;
@@ -2735,7 +2735,7 @@ struct monst *mtmp;
return; return;
} }
void STATIC_OVL void
deal_with_overcrowding(mtmp) deal_with_overcrowding(mtmp)
struct monst *mtmp; struct monst *mtmp;
{ {
+2 -2
View File
@@ -417,7 +417,7 @@ struct obj *obj;
return xname_flags(obj, CXN_NORMAL); return xname_flags(obj, CXN_NORMAL);
} }
char * STATIC_OVL char *
xname_flags(obj, cxn_flags) xname_flags(obj, cxn_flags)
register struct obj *obj; register struct obj *obj;
unsigned cxn_flags; /* bitmask of CXN_xxx values */ unsigned cxn_flags; /* bitmask of CXN_xxx values */
@@ -2576,7 +2576,7 @@ const char *oldstr;
return bp; return bp;
} }
boolean STATIC_OVL boolean
badman(basestr, to_plural) badman(basestr, to_plural)
const char *basestr; const char *basestr;
boolean to_plural; /* true => makeplural, false => makesingular */ boolean to_plural; /* true => makeplural, false => makesingular */
+2 -2
View File
@@ -1602,7 +1602,7 @@ int typ;
return (char *) 0; return (char *) 0;
} }
int STATIC_OVL int
query_msgtype() query_msgtype()
{ {
winid tmpwin; winid tmpwin;
@@ -1796,7 +1796,7 @@ const char *errmsg;
return retval; return retval;
} }
boolean STATIC_OVL boolean
add_menu_coloring_parsed(str, c, a) add_menu_coloring_parsed(str, c, a)
char *str; char *str;
int c, a; int c, a;
+11 -11
View File
@@ -1409,7 +1409,7 @@ static const char *suptext2[] = {
(char *) 0, (char *) 0,
}; };
void STATIC_OVL void
do_supplemental_info(name, pm, without_asking) do_supplemental_info(name, pm, without_asking)
char *name; char *name;
struct permonst *pm; struct permonst *pm;
@@ -1885,61 +1885,61 @@ docontact(VOID_ARGS)
destroy_nhwindow(cwin); destroy_nhwindow(cwin);
} }
void STATIC_OVL void
dispfile_help(VOID_ARGS) dispfile_help(VOID_ARGS)
{ {
display_file(HELP, TRUE); display_file(HELP, TRUE);
} }
void STATIC_OVL void
dispfile_shelp(VOID_ARGS) dispfile_shelp(VOID_ARGS)
{ {
display_file(SHELP, TRUE); display_file(SHELP, TRUE);
} }
void STATIC_OVL void
dispfile_optionfile(VOID_ARGS) dispfile_optionfile(VOID_ARGS)
{ {
display_file(OPTIONFILE, TRUE); display_file(OPTIONFILE, TRUE);
} }
void STATIC_OVL void
dispfile_license(VOID_ARGS) dispfile_license(VOID_ARGS)
{ {
display_file(LICENSE, TRUE); display_file(LICENSE, TRUE);
} }
void STATIC_OVL void
dispfile_debughelp(VOID_ARGS) dispfile_debughelp(VOID_ARGS)
{ {
display_file(DEBUGHELP, TRUE); display_file(DEBUGHELP, TRUE);
} }
void STATIC_OVL void
hmenu_doextversion(VOID_ARGS) hmenu_doextversion(VOID_ARGS)
{ {
(void) doextversion(); (void) doextversion();
} }
void STATIC_OVL void
hmenu_dohistory(VOID_ARGS) hmenu_dohistory(VOID_ARGS)
{ {
(void) dohistory(); (void) dohistory();
} }
void STATIC_OVL void
hmenu_dowhatis(VOID_ARGS) hmenu_dowhatis(VOID_ARGS)
{ {
(void) dowhatis(); (void) dowhatis();
} }
void STATIC_OVL void
hmenu_dowhatdoes(VOID_ARGS) hmenu_dowhatdoes(VOID_ARGS)
{ {
(void) dowhatdoes(); (void) dowhatdoes();
} }
void STATIC_OVL void
hmenu_doextlist(VOID_ARGS) hmenu_doextlist(VOID_ARGS)
{ {
(void) doextlist(); (void) doextlist();
+1 -1
View File
@@ -1710,7 +1710,7 @@ int x, y;
return FALSE; return FALSE;
} }
int STATIC_OVL int
do_loot_cont(cobjp, cindex, ccount) do_loot_cont(cobjp, cindex, ccount)
struct obj **cobjp; struct obj **cobjp;
int cindex, ccount; /* index of this container (1..N), number of them (N) */ int cindex, ccount; /* index of this container (1..N), number of them (N) */
+1 -1
View File
@@ -578,7 +578,7 @@ int how;
putmsghistory(out_line, FALSE); putmsghistory(out_line, FALSE);
} }
boolean STATIC_OVL boolean
skip_pager(common) skip_pager(common)
boolean common; boolean common;
{ {
+1 -1
View File
@@ -2725,7 +2725,7 @@ boolean ininv, dummy, silent;
} }
} }
void STATIC_OVL void
append_honorific(buf) append_honorific(buf)
char *buf; char *buf;
{ {
+2 -2
View File
@@ -951,7 +951,7 @@ unsigned long old_rumor_offset;
return rumor_offset; return rumor_offset;
} }
void STATIC_OVL void
do_rnd_access_file(fname) do_rnd_access_file(fname)
const char *fname; const char *fname;
{ {
@@ -1416,7 +1416,7 @@ do_date()
return; return;
} }
boolean STATIC_OVL boolean
get_gitinfo(githash, gitbranch) get_gitinfo(githash, gitbranch)
char *githash, *gitbranch; char *githash, *gitbranch;
{ {
+1 -1
View File
@@ -4132,7 +4132,7 @@ boolean force_update;
* must be updated because they need to change. * must be updated because they need to change.
* This is now done at an individual field case-by-case level. * This is now done at an individual field case-by-case level.
*/ */
boolean STATIC_OVL boolean
check_fields(forcefields, sz) check_fields(forcefields, sz)
boolean forcefields; boolean forcefields;
int sz[3]; int sz[3];