Add missing prototypes for static functions to avoid warnings.

This commit is contained in:
nhkeni
2024-02-29 10:49:53 -05:00
parent 356875ea20
commit acf60063d5
21 changed files with 45 additions and 0 deletions

View File

@@ -18,6 +18,7 @@ const char *const enc_stat[] = {
static const char *rank(void);
static void bot_via_windowport(void);
static void stat_update_time(void);
static char *get_strength_str(void);
static char *
get_strength_str(void)

View File

@@ -19,6 +19,8 @@
static int wiz_display_macros(void);
static int wiz_mon_diff(void);
#endif
static int wiz_load_splua(void);
static int wiz_telekinesis(void);
#ifdef DUMB /* stuff commented out in extern.h, but needed here */
extern int doapply(void); /**/

View File

@@ -40,6 +40,9 @@ static void dump_everything(int, time_t);
#ifdef CRASHREPORT
static const char *get_saved_pline(int);
#endif
static void fixup_death(int);
static int wordcount(char *);
static void bel_copy1(char **, char *);
#if defined(__BEOS__) || defined(MICRO) || defined(OS2) || defined(WIN32)
ATTRNORETURN extern void nethack_exit(int) NORETURN;

View File

@@ -40,6 +40,7 @@ static void move_update(boolean);
static int pickup_checks(void);
static boolean doorless_door(coordxy, coordxy);
static void maybe_wail(void);
static boolean water_turbulence(coordxy *, coordxy *);
#define IS_SHOP(x) (gr.rooms[x].rtype >= SHOPBASE)

View File

@@ -948,6 +948,7 @@ static struct tm *getlt(void);
/* Sets the seed for the random number generator */
#ifdef USE_ISAAC64
static void set_random(unsigned long seed, int (*)(int));
static void
set_random(unsigned long seed,

View File

@@ -35,6 +35,7 @@ static int QSORTCALLBACK vanqsort_cmp(const genericptr, const genericptr);
static int num_extinct(void);
static int num_gone(int, int *);
static char *size_str(int);
static void item_resistance_message(int, const char *, int);
extern const char *const hu_stat[]; /* hunger status from eat.c */
extern const char *const enc_stat[]; /* encumbrance status from botl.c */

View File

@@ -30,6 +30,11 @@
#define inline /*empty*/
#endif
static inline uint32_t lower_bits(uint64_t);
static inline uint32_t upper_bits(uint64_t);
static void isaac64_update(isaac64_ctx *);
static void isaac64_mix(uint64_t[8]);
/* Extract ISAAC64_SZ_LOG bits (starting at bit 3). */
static inline uint32_t lower_bits(uint64_t x)
{

View File

@@ -24,6 +24,7 @@ static void m_initthrow(struct monst *, int, int);
static void m_initweap(struct monst *);
static void m_initinv(struct monst *);
static boolean makemon_rnd_goodpos(struct monst *, mmflags_nht, coord *);
static void init_mextra(struct mextra *);
#define m_initsgrp(mtmp, x, y, mmf) m_initgrp(mtmp, x, y, 3, mmf)
#define m_initlgrp(mtmp, x, y, mmf) m_initgrp(mtmp, x, y, 10, mmf)

View File

@@ -26,6 +26,7 @@ static void stolen_booty(void);
static boolean maze_inbounds(coordxy, coordxy);
static void maze_remove_deadends(xint16);
static void populate_maze(void);
static boolean is_exclusion_zone(xint16, coordxy, coordxy);
/* adjust a coordinate one step in the specified direction */
#define mz_move(X, Y, dir) \

View File

@@ -25,6 +25,7 @@ static void insane_object(struct obj *, const char *, const char *,
static void check_contained(struct obj *, const char *);
static void check_glob(struct obj *, const char *);
static void sanity_check_worn(struct obj *);
static void init_oextra(struct oextra *);
struct icp {
int iprob; /* probability of an item type */

View File

@@ -26,6 +26,7 @@ static void leppie_stash(struct monst *);
static boolean m_balks_at_approaching(struct monst *);
static boolean stuff_prevents_passage(struct monst *);
static int vamp_shift(struct monst *, struct permonst *, boolean);
static void maybe_spin_web(struct monst *);
/* a11y: give a message when monster moved */
static void

View File

@@ -27,6 +27,7 @@ static int l_obj_timer_peek(lua_State *);
static int l_obj_timer_stop(lua_State *);
static int l_obj_timer_start(lua_State *);
static int l_obj_bury(lua_State *);
static struct _lua_obj *l_obj_push(lua_State *, struct obj *);
#define lobj_is_ok(lo) ((lo) && (lo)->obj && (lo)->obj->where != OBJ_LUAFREE)

View File

@@ -23,6 +23,8 @@
/* */
struct e;
/* lua_CFunction prototypes */
#ifdef DUMPLOG
static int nhl_dump_fmtstr(lua_State *);
@@ -80,6 +82,13 @@ static void nhlL_openlibs(lua_State *, uint32_t);
static void *nhl_alloc(void *, void *, size_t, size_t);
static lua_State *nhlL_newstate (nhl_sandbox_info *, const char *);
static void end_luapat(void);
static int nhl_get_config(lua_State *);
static int nhl_variable(lua_State *);
static void nhl_clearfromtable(lua_State *, int, int, struct e *);
static void nhl_warn(void *, const char *, int);
static void nhl_clearfromtable(lua_State *, int, int, struct e *);
static int nhl_panic(lua_State *);
static void nhl_hookfn(lua_State *, lua_Debug *);
static const char *const nhcore_call_names[NUM_NHCORE_CALLS] = {
"start_new_game",

View File

@@ -26,6 +26,9 @@ NEARDATA struct instance_flags iflags; /* provide linkage */
#define PREV_MSGS 0
#endif
static char *color_attr_to_str(color_attr *);
static boolean color_attr_parse_str(color_attr *, char *);
/*
* NOTE: If you add (or delete) an option, please review the following:
* doc/options.txt

View File

@@ -8,6 +8,7 @@
#include "isaac64.h"
static int whichrng(int (*fn)(int));
static int RND(int);
#if 0
static isaac64_ctx rng_state;

View File

@@ -14,6 +14,7 @@ static int domonnoise(struct monst *);
static int dochat(void);
static struct monst *responsive_mon_at(int, int);
static int mon_in_room(struct monst *, int);
static boolean oracle_sound(struct monst *);
/* this easily could be a macro, but it might overtax dumb compilers */
static int

View File

@@ -67,6 +67,10 @@ static void fill_empty_maze(void);
static void splev_initlev(lev_init *);
static boolean generate_way_out_method(coordxy nx, coordxy ny,
struct selectionvar *ov);
static void l_push_wid_hei_table(lua_State *, int, int);
static boolean good_stair_loc(coordxy, coordxy);
static void ensure_way_out(void);
#if 0
/* macosx complains that these are unused */
static long sp_code_jmpaddr(long, long);

View File

@@ -25,6 +25,9 @@
#define spellet(spell) \
((char) ((spell < 26) ? ('a' + spell) : ('A' + spell - 26)))
struct chain_lightning_queue;
struct chain_lightning_zap;
static int spell_let_to_idx(char);
static boolean cursed_book(struct obj * bp);
static boolean confused_book(struct obj *);
@@ -48,6 +51,8 @@ static const char *spelltypemnemonic(int);
static boolean can_center_spell_location(coordxy, coordxy);
static void display_spell_target_positions(boolean);
static boolean spell_aim_step(genericptr_t, coordxy, coordxy);
static void propagate_chain_lightning(struct chain_lightning_queue *,
struct chain_lightning_zap);
/* The roles[] table lists the role-specific values for tuning
* percent_success().

View File

@@ -14,6 +14,7 @@ static boolean rloc_pos_ok(coordxy, coordxy, struct monst *);
static void rloc_to_core(struct monst *, coordxy, coordxy, unsigned);
static void mvault_tele(struct monst *);
static boolean m_blocks_teleporting(struct monst *);
static stairway *stairway_find_forwiz(boolean, boolean);
/* does monster block others from teleporting? */
static boolean

View File

@@ -50,6 +50,7 @@ static char *fix_glyphname(char *str);
static int32_t rgbstr_to_int32(const char *rgbstr);
boolean closest_color(uint32_t lcolor, uint32_t *closecolor, int *clridx);
static const long nonzero_black = 0x1000000;
static int color_distance(uint32_t, uint32_t);
static void
to_custom_symset_entry_callback(int glyph, struct find_struct *findwhat)

View File

@@ -36,6 +36,7 @@ static int zap_ok(struct obj *) NO_NNARGS;
static void boxlock_invent(struct obj *) NONNULLARG1;
static int spell_hit_bonus(int);
static int maybe_destroy_item(struct monst *, struct obj *, int) NONNULLPTRS;
static boolean destroyable(struct obj *, int);
static void wishcmdassist(int);