diff --git a/src/bones.c b/src/bones.c index cdfab3a07..07a0670ba 100644 --- a/src/bones.c +++ b/src/bones.c @@ -8,9 +8,9 @@ static boolean no_bones_level(d_level *); static void goodfruit(int); static void resetobjs(struct obj *, boolean); -static void give_to_nearby_mon(struct obj *, coordxy, coordxy); -static boolean fixuporacle(struct monst *); -static void remove_mon_from_bones(struct monst *); +static void give_to_nearby_mon(struct obj *, coordxy, coordxy) NONNULLARG1; +static boolean fixuporacle(struct monst *) NONNULLARG1; +static void remove_mon_from_bones(struct monst *) NONNULLARG1; static void set_ghostly_objlist(struct obj *objchain); static boolean diff --git a/src/dig.c b/src/dig.c index a6a1f98f5..01142910f 100644 --- a/src/dig.c +++ b/src/dig.c @@ -10,8 +10,8 @@ static void mkcavepos(coordxy, coordxy, int, boolean, boolean); static void mkcavearea(boolean); static int dig(void); static void dig_up_grave(coord *); -static boolean watchman_canseeu(struct monst *); -static int adj_pit_checks(coord *, char *); +static boolean watchman_canseeu(struct monst *) NONNULLARG1; +static int adj_pit_checks(coord *, char *) NONNULLARG2; static void pit_flow(struct trap *, schar); static boolean furniture_handled(coordxy, coordxy, boolean); diff --git a/src/display.c b/src/display.c index 4ea4c1896..77ae79964 100644 --- a/src/display.c +++ b/src/display.c @@ -124,14 +124,15 @@ #include "hack.h" static void show_mon_or_warn(coordxy, coordxy, int); -static void display_monster(coordxy, coordxy, struct monst *, int, boolean); +static void display_monster(coordxy, coordxy, + struct monst *, int, boolean) NONNULLPTRS; static int swallow_to_glyph(int, int); -static void display_warning(struct monst *); +static void display_warning(struct monst *) NONNULLARG1; static int check_pos(coordxy, coordxy, int); static void get_bkglyph_and_framecolor(coordxy x, coordxy y, int *, uint32 *); static int tether_glyph(coordxy, coordxy); -static void mimic_light_blocking(struct monst *); +static void mimic_light_blocking(struct monst *) NONNULLARG1; #ifdef UNBUFFERED_GLYPHINFO static glyph_info *glyphinfo_at(coordxy, coordxy, int); #endif diff --git a/src/do_name.c b/src/do_name.c index e6c4ec459..03cd077cb 100644 --- a/src/do_name.c +++ b/src/do_name.c @@ -20,12 +20,12 @@ static void gloc_filter_done(void); static boolean gather_locs_interesting(coordxy, coordxy, int); static void gather_locs(coord **, int *, int); static void truncate_to_map(int *, int *, schar, schar); -static void getpos_refresh(int *); +static void getpos_refresh(int *) NONNULLARG1; static char *name_from_player(char *, const char *, const char *); static void do_mgivenname(void); -static boolean alreadynamed(struct monst *, char *, char *); -static void do_oname(struct obj *); -static char *docall_xname(struct obj *); +static boolean alreadynamed(struct monst *, char *, char *) NONNULLPTRS; +static void do_oname(struct obj *) NONNULLARG1; +static char *docall_xname(struct obj *) NONNULLARG1; static void namefloorobj(void); extern const char what_is_an_unknown_object[]; /* from pager.c */ diff --git a/src/dog.c b/src/dog.c index 6a664bd9c..1da5b8747 100644 --- a/src/dog.c +++ b/src/dog.c @@ -7,7 +7,7 @@ static int pet_type(void); static void set_mon_lastmove(struct monst *); -static int mon_leave(struct monst *); +static int mon_leave(struct monst *) NONNULLARG1; static boolean keep_mon_accessible(struct monst *); enum arrival { diff --git a/src/dogmove.c b/src/dogmove.c index 90df3790f..a93ed4d32 100644 --- a/src/dogmove.c +++ b/src/dogmove.c @@ -20,7 +20,7 @@ static int find_friends(struct monst *, struct monst *, int); static struct monst *best_target(struct monst *); static long score_targ(struct monst *, struct monst *); static boolean can_reach_location(struct monst *, coordxy, coordxy, coordxy, - coordxy); + coordxy) NONNULLARG1; /* pick a carried item for pet to drop */ struct obj * diff --git a/src/dokick.c b/src/dokick.c index d6927d116..f1b1f273a 100644 --- a/src/dokick.c +++ b/src/dokick.c @@ -14,16 +14,17 @@ static void kickdmg(struct monst *, boolean); static boolean maybe_kick_monster(struct monst *, coordxy, coordxy); static void kick_monster(struct monst *, coordxy, coordxy); -static int kick_object(coordxy, coordxy, char *); +static int kick_object(coordxy, coordxy, char *) NONNULLARG3; static int really_kick_object(coordxy, coordxy); -static char *kickstr(char *, const char *); -static boolean watchman_thief_arrest(struct monst *); -static boolean watchman_door_damage(struct monst *, coordxy, coordxy); +static char *kickstr(char *, const char *) NONNULLPTRS; +static boolean watchman_thief_arrest(struct monst *) NONNULLPTRS; +static boolean watchman_door_damage(struct monst *, + coordxy, coordxy) NONNULLARG1; static void kick_dumb(coordxy, coordxy); -static void kick_ouch(coordxy, coordxy, const char *); +static void kick_ouch(coordxy, coordxy, const char *) NONNULLARG3; static void kick_door(coordxy, coordxy, int); static void otransit_msg(struct obj *, boolean, boolean, long); -static void drop_to(coord *, schar, coordxy, coordxy); +static void drop_to(coord *, schar, coordxy, coordxy) NONNULLARG1; static const char kick_passes_thru[] = "kick passes harmlessly through"; diff --git a/src/explode.c b/src/explode.c index d87d9df36..f6922676e 100644 --- a/src/explode.c +++ b/src/explode.c @@ -4,7 +4,7 @@ #include "hack.h" -static int explosionmask(struct monst *, uchar, char); +static int explosionmask(struct monst *, uchar, char) NONNULLARG1; static void engulfer_explosion_msg(uchar, char); /* Note: Arrays are column first, while the screen is row first */ diff --git a/src/fountain.c b/src/fountain.c index 2525155b1..ac301c98d 100644 --- a/src/fountain.c +++ b/src/fountain.c @@ -9,9 +9,9 @@ static void dowatersnakes(void); static void dowaterdemon(void); static void dowaternymph(void); -static void gush(coordxy, coordxy, genericptr_t); +static void gush(coordxy, coordxy, genericptr_t) NONNULLARG3; static void dofindgem(void); -static boolean watchman_warn_fountain(struct monst *); +static boolean watchman_warn_fountain(struct monst *) NONNULLARG1; DISABLE_WARNING_FORMAT_NONLITERAL diff --git a/src/hack.c b/src/hack.c index 6ad4a59cb..d314e2c2f 100644 --- a/src/hack.c +++ b/src/hack.c @@ -14,16 +14,17 @@ static boolean findtravelpath(int); static boolean trapmove(coordxy, coordxy, struct trap *); static schar u_simple_floortyp(coordxy, coordxy); static boolean swim_move_danger(coordxy, coordxy); -static boolean domove_bump_mon(struct monst *, int); +static boolean domove_bump_mon(struct monst *, int) NONNULLARG1; static boolean domove_attackmon_at(struct monst *, coordxy, coordxy, - boolean *); + boolean *) NONNULLPTRS; static boolean domove_fight_ironbars(coordxy, coordxy); static boolean domove_fight_web(coordxy, coordxy); -static boolean domove_swap_with_pet(struct monst *, coordxy, coordxy); +static boolean domove_swap_with_pet(struct monst *, + coordxy, coordxy) NONNULLARG1; static boolean domove_fight_empty(coordxy, coordxy); static boolean air_turbulence(void); static void slippery_ice_fumbling(void); -static boolean impaired_movement(coordxy *, coordxy *); +static boolean impaired_movement(coordxy *, coordxy *) NONNULLPTRS; static boolean avoid_moving_on_trap(coordxy, coordxy, boolean); static boolean avoid_moving_on_liquid(coordxy, coordxy, boolean); static boolean avoid_running_into_trap_or_liquid(coordxy, coordxy); @@ -32,7 +33,7 @@ static boolean carrying_too_much(void); static boolean escape_from_sticky_mon(coordxy, coordxy); static void domove_core(void); static void maybe_smudge_engr(coordxy, coordxy, coordxy, coordxy); -static struct monst *monstinroom(struct permonst *, int); +static struct monst *monstinroom(struct permonst *, int) NONNULLARG1; static boolean furniture_present(int, int); static void move_update(boolean); static int pickup_checks(void); diff --git a/src/invent.c b/src/invent.c index 40935a38a..167eee0cf 100644 --- a/src/invent.c +++ b/src/invent.c @@ -15,7 +15,7 @@ static char *loot_xname(struct obj *); static int invletter_value(char); static int QSORTCALLBACK sortloot_cmp(const genericptr, const genericptr); static void reorder_invent(void); -static struct obj *addinv_core0(struct obj *, struct obj *, boolean); +static struct obj *addinv_core0(struct obj *, struct obj *, boolean) NONNULLARG1; static void noarmor(boolean); static void invdisp_nothing(const char *, const char *); static boolean worn_wield_only(struct obj *); diff --git a/src/light.c b/src/light.c index 901a72aec..43701ed00 100644 --- a/src/light.c +++ b/src/light.c @@ -42,7 +42,8 @@ #define LSF_SHOW 0x1 /* display the light source */ #define LSF_NEEDS_FIXUP 0x2 /* need oid fixup */ -static light_source *new_light_core(coordxy, coordxy, int, int, anything *); +static light_source *new_light_core(coordxy, coordxy, + int, int, anything *) NONNULLPTRS; static void discard_flashes(void); static void write_ls(NHFILE *, light_source *); static int maybe_write_ls(NHFILE *, int, boolean); diff --git a/src/mkobj.c b/src/mkobj.c index c926276ed..baf2c6753 100644 --- a/src/mkobj.c +++ b/src/mkobj.c @@ -13,7 +13,7 @@ static void mksobj_init(struct obj *, boolean); static int item_on_ice(struct obj *); static void shrinking_glob_gone(struct obj *); static void obj_timer_checks(struct obj *, coordxy, coordxy, int); -static void container_weight(struct obj *); +static void container_weight(struct obj *) NONNULLARG1; static struct obj *save_mtraits(struct obj *, struct monst *); static void objlist_sanity(struct obj *, int, const char *); static void shop_obj_sanity(struct obj *, const char *); diff --git a/src/mthrowu.c b/src/mthrowu.c index 5261cd780..f498c2685 100644 --- a/src/mthrowu.c +++ b/src/mthrowu.c @@ -10,7 +10,7 @@ static void monshoot(struct monst *, struct obj *, struct obj *); static boolean ucatchgem(struct obj *, struct monst *); static const char* breathwep_name(int); static boolean drop_throw(struct obj *, boolean, coordxy, coordxy); -static int m_lined_up(struct monst *, struct monst *); +static int m_lined_up(struct monst *, struct monst *) NONNULLARG12; #define URETREATING(x, y) \ (distmin(u.ux, u.uy, x, y) > distmin(u.ux0, u.uy0, x, y))