NONNULLxxx for several files
src/date.c src/mdlib.c src/timeout.c src/u_init.c src/vault.c src/version.c src/windows.c
This commit is contained in:
@@ -35,6 +35,7 @@
|
||||
* NONNULLARG5 The 5th argument is declared nonnull.
|
||||
* NONNULLARG7 The 7th argument is declared nonnull (bhit).
|
||||
* NONNULLARG12 The 1st and 2nd arguments are declared nonnull.
|
||||
* NONNULLARG23 The 2nd and 3rd arguments are declared nonnull.
|
||||
* NONNULLARG13 The 1st and 3rd arguments are declared nonnull.
|
||||
* NONNULLARG123 The 1st, 2nd and 3rd arguments are declared nonnull.
|
||||
* NONNULLARG14 The 1st and 4th arguments are declared nonnull.
|
||||
@@ -378,7 +379,7 @@ extern void makemap_prepost(boolean, boolean);
|
||||
|
||||
/* ### date.c ### */
|
||||
|
||||
extern void populate_nomakedefs(struct version_info *);
|
||||
extern void populate_nomakedefs(struct version_info *) NONNULLARG1;
|
||||
extern void free_nomakedefs(void);
|
||||
|
||||
/* ### dbridge.c ### */
|
||||
@@ -1438,8 +1439,9 @@ extern int buzzmu(struct monst *, struct attack *) NONNULLARG12;
|
||||
/* ### mdlib.c ### */
|
||||
|
||||
extern void runtime_info_init(void);
|
||||
extern const char *do_runtime_info(int *);
|
||||
extern const char *do_runtime_info(int *) NO_NNARGS;
|
||||
extern void release_runtime_info(void);
|
||||
extern char *mdlib_version_string(char *, const char *) NONNULL NONNULLPTRS;
|
||||
#ifdef ENHANCED_SYMBOLS
|
||||
extern void dump_glyphids(void);
|
||||
#endif
|
||||
@@ -3349,8 +3351,8 @@ extern void vault_gd_watching(unsigned int);
|
||||
|
||||
/* ### version.c ### */
|
||||
|
||||
extern char *version_string(char *, size_t bufsz) NONNULLARG1;
|
||||
extern char *getversionstring(char *, size_t bufsz) NONNULLARG1;
|
||||
extern char *version_string(char *, size_t bufsz) NONNULL NONNULLARG1;
|
||||
extern char *getversionstring(char *, size_t bufsz) NONNULL NONNULLARG1;
|
||||
extern int doversion(void);
|
||||
extern int doextversion(void);
|
||||
#ifdef MICRO
|
||||
@@ -3363,7 +3365,7 @@ extern void store_formatindicator(NHFILE *) NONNULLARG1;
|
||||
extern void store_version(NHFILE *) NONNULLARG1;
|
||||
extern unsigned long get_feature_notice_ver(char *) NO_NNARGS;
|
||||
extern unsigned long get_current_feature_ver(void);
|
||||
extern const char *copyright_banner_line(int);
|
||||
extern const char *copyright_banner_line(int) NONNULL;
|
||||
extern void early_version_info(boolean);
|
||||
|
||||
/* ### video.c ### */
|
||||
|
||||
@@ -383,6 +383,7 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
|
||||
#define NONNULLARG5 __attribute__((nonnull (5)))
|
||||
#define NONNULLARG7 __attribute__((nonnull (7))) /* for bhit() */
|
||||
#define NONNULLARG12 __attribute__((nonnull (1, 2)))
|
||||
#define NONNULLARG23 __attribute__((nonnull (2, 3)))
|
||||
#define NONNULLARG123 __attribute__((nonnull (1, 2, 3)))
|
||||
#define NONNULLARG13 __attribute__((nonnull (1, 3)))
|
||||
#define NONNULLARG14 __attribute__((nonnull (1, 4))) /* for query_category */
|
||||
@@ -428,6 +429,7 @@ typedef genericptr genericptr_t; /* (void *) or (char *) */
|
||||
#define NONNULLARG5
|
||||
#define NONNULLARG7
|
||||
#define NONNULLARG12
|
||||
#define NONNULLARG23
|
||||
#define NONNULLARG123
|
||||
#define NONNULLARG13
|
||||
#define NONNULLARG14
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
#include "config.h"
|
||||
|
||||
/* these are in extern.h but we don't include hack.h */
|
||||
void populate_nomakedefs(struct version_info *);
|
||||
void populate_nomakedefs(struct version_info *) NONNULLARG1;
|
||||
void free_nomakedefs(void);
|
||||
|
||||
#define Snprintf(str, size, ...) \
|
||||
|
||||
25
src/mdlib.c
25
src/mdlib.c
@@ -55,14 +55,12 @@
|
||||
static boolean date_via_env = FALSE;
|
||||
|
||||
extern unsigned long md_ignored_features(void);
|
||||
char *mdlib_version_string(char *, const char *);
|
||||
char *version_id_string(char *, size_t, const char *);
|
||||
char *bannerc_string(char *, size_t, const char *);
|
||||
int case_insensitive_comp(const char *, const char *);
|
||||
char *version_id_string(char *, size_t, const char *) NONNULL NONNULLPTRS;
|
||||
char *bannerc_string(char *, size_t, const char *) NONNULL NONNULLPTRS;
|
||||
int case_insensitive_comp(const char *, const char *) NONNULLPTRS;
|
||||
|
||||
static void make_version(void);
|
||||
static char *eos(char *);
|
||||
int mstrength(struct permonst *);
|
||||
static char *eos(char *) NONNULL NONNULLARG1;
|
||||
|
||||
#if 0
|
||||
static char *mdlib_strsubst(char *, const char *, const char *);
|
||||
@@ -81,15 +79,16 @@ extern int GUILaunched;
|
||||
#endif
|
||||
|
||||
/* these are in extern.h but we don't include hack.h */
|
||||
void runtime_info_init(void);
|
||||
const char *do_runtime_info(int *);
|
||||
void release_runtime_info(void);
|
||||
void populate_nomakedefs(struct version_info *);
|
||||
extern void populate_nomakedefs(struct version_info *) NONNULLARG1; /* date.c */
|
||||
extern void free_nomakedefs(void); /* date.c */
|
||||
void runtime_info_init(void);
|
||||
const char *do_runtime_info(int *) NO_NNARGS;
|
||||
void release_runtime_info(void);
|
||||
char *mdlib_version_string(char *, const char *) NONNULL NONNULLPTRS;
|
||||
|
||||
void build_options(void);
|
||||
static void build_options(void);
|
||||
static int count_and_validate_winopts(void);
|
||||
static void opt_out_words(char *, int *);
|
||||
static void opt_out_words(char *, int *) NONNULLPTRS;
|
||||
static void build_savebones_compat_string(void);
|
||||
|
||||
static int idxopttext, done_runtime_opt_init_once = 0;
|
||||
@@ -750,7 +749,7 @@ opt_out_words(
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
static void
|
||||
build_options(void)
|
||||
{
|
||||
char buf[COLBUFSZ];
|
||||
|
||||
@@ -11,14 +11,14 @@ static void sleep_dialogue(void);
|
||||
static void choke_dialogue(void);
|
||||
static void levitation_dialogue(void);
|
||||
static void slime_dialogue(void);
|
||||
static void slimed_to_death(struct kinfo *);
|
||||
static void slimed_to_death(struct kinfo *) NO_NNARGS;
|
||||
static void sickness_dialogue(void);
|
||||
static void phaze_dialogue(void);
|
||||
static void done_timeout(int, int);
|
||||
static void slip_or_trip(void);
|
||||
static void see_lamp_flicker(struct obj *, const char *);
|
||||
static void lantern_message(struct obj *);
|
||||
static void cleanup_burn(ANY_P *, long);
|
||||
static void see_lamp_flicker(struct obj *, const char *) NONNULLPTRS;
|
||||
static void lantern_message(struct obj *) NONNULLARG1;
|
||||
static void cleanup_burn(ANY_P *, long) NONNULLARG1;
|
||||
|
||||
/* used by wizard mode #timeout and #wizintrinsic; order by 'interest'
|
||||
for timeout countdown, where most won't occur in normal play */
|
||||
|
||||
@@ -13,7 +13,7 @@ struct trobj {
|
||||
Bitfield(trbless, 2);
|
||||
};
|
||||
|
||||
static void ini_inv(struct trobj *);
|
||||
static void ini_inv(struct trobj *) NONNULLARG1;
|
||||
static void knows_object(int);
|
||||
static void knows_class(char);
|
||||
static boolean restricted_spell_discipline(int);
|
||||
|
||||
22
src/vault.c
22
src/vault.c
@@ -5,18 +5,18 @@
|
||||
|
||||
#include "hack.h"
|
||||
|
||||
static boolean clear_fcorr(struct monst *, boolean);
|
||||
static boolean clear_fcorr(struct monst *, boolean) NONNULLARG1;
|
||||
static void blackout(coordxy, coordxy);
|
||||
static void restfakecorr(struct monst *);
|
||||
static void parkguard(struct monst *);
|
||||
static boolean in_fcorridor(struct monst *, coordxy, coordxy);
|
||||
static boolean find_guard_dest(struct monst *, coordxy *, coordxy *);
|
||||
static void move_gold(struct obj *, int);
|
||||
static void wallify_vault(struct monst *);
|
||||
static void gd_mv_monaway(struct monst *, int, int);
|
||||
static void gd_pick_corridor_gold(struct monst *, int, int);
|
||||
static int gd_move_cleanup(struct monst *, boolean, boolean);
|
||||
static void gd_letknow(struct monst *);
|
||||
static void restfakecorr(struct monst *) NONNULLARG1;
|
||||
static void parkguard(struct monst *) NONNULLARG1;
|
||||
static boolean in_fcorridor(struct monst *, coordxy, coordxy) NONNULLARG1;
|
||||
static boolean find_guard_dest(struct monst *, coordxy *, coordxy *) NONNULLARG23;
|
||||
static void move_gold(struct obj *, int) NONNULLARG1;
|
||||
static void wallify_vault(struct monst *) NONNULLARG1;
|
||||
static void gd_mv_monaway(struct monst *, int, int) NONNULLARG1;
|
||||
static void gd_pick_corridor_gold(struct monst *, int, int) NONNULLARG1;
|
||||
static int gd_move_cleanup(struct monst *, boolean, boolean) NONNULLARG1;
|
||||
static void gd_letknow(struct monst *) NONNULLARG1;
|
||||
|
||||
void
|
||||
newegd(struct monst *mtmp)
|
||||
|
||||
@@ -10,10 +10,10 @@
|
||||
#define OPTIONS_AT_RUNTIME
|
||||
#endif
|
||||
|
||||
extern char *mdlib_version_string(char *, const char *);
|
||||
static void insert_rtoption(char *);
|
||||
static void insert_rtoption(char *) NONNULLARG1;
|
||||
|
||||
/* fill buffer with short version (so caller can avoid including date.h) */
|
||||
/* fill buffer with short version (so caller can avoid including date.h)
|
||||
* buf cannot be NULL */
|
||||
char *
|
||||
version_string(char *buf, size_t bufsz)
|
||||
{
|
||||
|
||||
@@ -60,12 +60,12 @@ extern void *trace_procs_chain(int, int, void *, void *, void *);
|
||||
#endif
|
||||
|
||||
#if defined(WINCHAIN) || defined(TTY_GRAPHICS)
|
||||
static struct win_choices *win_choices_find(const char *s);
|
||||
static struct win_choices *win_choices_find(const char *s) NONNULLARG1;
|
||||
#endif
|
||||
|
||||
static void def_raw_print(const char *s);
|
||||
static void def_raw_print(const char *s) NONNULLARG1;
|
||||
static void def_wait_synch(void);
|
||||
static boolean get_menu_coloring(const char *, int *, int *);
|
||||
static boolean get_menu_coloring(const char *, int *, int *) NONNULLPTRS;
|
||||
|
||||
#ifdef DUMPLOG
|
||||
static winid dump_create_nhwindow(int);
|
||||
|
||||
Reference in New Issue
Block a user