From: PatR Date: Sun, 5 Apr 2020 21:31:01 +0000 (-0700) Subject: warning fix X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=300d987bdf3d6dad56f3df83499ff5d575185b59;p=nethack warning fix A couple of the new prototypes used 'char' where 'CHAR_P' is needed. Also, move them out of middle of long block of command declarations. I started to reorder the prototypes into the order in which those functions appear in the file but gave that up pretty quickly. --- diff --git a/src/cmd.c b/src/cmd.c index c58561684..c0d3946ff 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 cmd.c $NHDT-Date: 1583704247 2020/03/08 21:50:47 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.408 $ */ +/* NetHack 3.6 cmd.c $NHDT-Date: 1586122255 2020/04/05 21:30:55 $ $NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.413 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Robert Patrick Rankin, 2013. */ /* NetHack may be freely redistributed. See license for details. */ @@ -123,13 +123,6 @@ extern int NDECL(dozap); /**/ extern int NDECL(doorganize); /**/ #endif /* DUMB */ -static void NDECL(commands_init); -static int FDECL(dokeylist_putcmds, (winid, BOOLEAN_P, int, int, boolean *)); -static int FDECL(ch2spkeys, (char, int, int)); -static boolean FDECL(prefix_cmd, (char)); - -static int NDECL((*timed_occ_fn)); - static int NDECL(dosuspend_core); static int NDECL(dosh_core); static int NDECL(doherecmdmenu); @@ -158,14 +151,17 @@ static int NDECL(wiz_show_vision); static int NDECL(wiz_smell); static int NDECL(wiz_intrinsic); static int NDECL(wiz_show_wmodes); +static int NDECL(wiz_show_stats); +static int NDECL(wiz_rumor_check); +#ifdef DEBUG_MIGRATING_MONS +static int NDECL(wiz_migrate_mons); +#endif + static void NDECL(wiz_map_levltyp); static void NDECL(wiz_levltyp_legend); #if defined(__BORLANDC__) && !defined(_WIN32) extern void FDECL(show_borlandc_stats, (winid)); #endif -#ifdef DEBUG_MIGRATING_MONS -static int NDECL(wiz_migrate_mons); -#endif static int FDECL(size_monst, (struct monst *, BOOLEAN_P)); static int FDECL(size_obj, (struct obj *)); static void FDECL(count_obj, (struct obj *, long *, long *, @@ -178,9 +174,7 @@ static void FDECL(mon_chain, (winid, const char *, struct monst *, BOOLEAN_P, long *, long *)); static void FDECL(contained_stats, (winid, const char *, long *, long *)); static void FDECL(misc_stats, (winid, long *, long *)); -static int NDECL(wiz_show_stats); static boolean FDECL(accept_menu_prefix, (int NDECL((*)))); -static int NDECL(wiz_rumor_check); static void FDECL(add_herecmd_menuitem, (winid, int NDECL((*)), const char *)); @@ -190,6 +184,13 @@ static char *NDECL(parse); static void FDECL(show_direction_keys, (winid, CHAR_P, BOOLEAN_P)); static boolean FDECL(help_dir, (CHAR_P, int, const char *)); +static void NDECL(commands_init); +static int FDECL(dokeylist_putcmds, (winid, BOOLEAN_P, int, int, boolean *)); +static int FDECL(ch2spkeys, (CHAR_P, int, int)); +static boolean FDECL(prefix_cmd, (CHAR_P)); + +static int NDECL((*timed_occ_fn)); + static const char *readchar_queue = ""; /* for rejecting attempts to use wizard mode commands */ static const char unavailcmd[] = "Unavailable command '%s'.";