From: nhmall Date: Sun, 24 Nov 2019 22:26:35 +0000 (-0500) Subject: clean up some macosx build warnings X-Git-Tag: NetHack-3.7.0_WIP~236^2^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5d778f7418229b7fd7722a83976841600bfc540e;p=nethack clean up some macosx build warnings --- diff --git a/src/mdlib.c b/src/mdlib.c index 6d3dcdd5d..40650add2 100644 --- a/src/mdlib.c +++ b/src/mdlib.c @@ -1,4 +1,4 @@ -/* NetHack 3.7 mdlib.c $NHDT-Date: 1562180226 2019/07/03 18:57:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.149 $ */ +/* NetHack 3.7 mdlib.c $NHDT-Date: 1574634382 2019/11/24 22:26:22 $ $NHDT-Branch: paxed-quest-lua $:$NHDT-Revision: 1.0 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ @@ -41,7 +41,10 @@ #if !defined(AMIGA) || defined(AZTEC_C) #define rewind(fp) fseek((fp), 0L, SEEK_SET) /* guarantee a return value */ #endif /* AMIGA || AZTEC_C */ - +#else +#ifndef GLOBAL_H +#include "global.h" +#endif #endif /* !MAKEDEFS_C */ void NDECL(build_options); @@ -555,15 +558,7 @@ build_options() { char buf[BUFSZ]; int i, length, winsyscnt; - - build_savebones_compat_string(); - opttext[idxopttext] = strdup(optbuf); - if (idxopttext < (MAXOPT - 1)) - idxopttext++; - Sprintf(optbuf, - "%sNetHack version %d.%d.%d%s\n", - opt_indent, - VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL, + const char *bosuffix = { #if (NH_DEVEL_STATUS != NH_STATUS_RELEASED) #if (NH_DEVEL_STATUS == NH_STATUS_BETA) " [beta]" @@ -572,8 +567,16 @@ build_options() #endif #else "" -#endif /* NH_DEVEL_STATUS == NH_STATUS_RELEASED */ - ); +#endif + }; + + build_savebones_compat_string(); + opttext[idxopttext] = strdup(optbuf); + if (idxopttext < (MAXOPT - 1)) + idxopttext++; + (void) sprintf(optbuf, + "%sNetHack version %d.%d.%d%s\n",opt_indent, + VERSION_MAJOR, VERSION_MINOR, PATCHLEVEL, bosuffix); opttext[idxopttext] = strdup(optbuf); if (idxopttext < (MAXOPT - 1)) idxopttext++; diff --git a/src/questpgr.c b/src/questpgr.c index 770ec8cb0..3d7fa3919 100644 --- a/src/questpgr.c +++ b/src/questpgr.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 questpgr.c $NHDT-Date: 1505172128 2017/09/11 23:22:08 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.38 $ */ +/* NetHack 3.6 questpgr.c $NHDT-Date: 1574634383 2019/11/24 22:26:23 $ $NHDT-Branch: paxed-quest-lua $:$NHDT-Revision: 1.63 $ */ /* Copyright 1991, M. Stephenson */ /* NetHack may be freely redistributed. See license for details. */ @@ -21,12 +21,14 @@ static const char *NDECL(neminame); static const char *NDECL(guardname); static const char *NDECL(homebase); static void FDECL(qtext_pronoun, (CHAR_P, CHAR_P)); -static struct qtmsg *FDECL(msg_in, (struct qtmsg *, int)); static void FDECL(convert_arg, (CHAR_P)); static void FDECL(convert_line, (char *,char *)); static void FDECL(deliver_by_pline, (const char *)); static void FDECL(deliver_by_window, (const char *, int)); static boolean FDECL(skip_pager, (BOOLEAN_P)); +#if 0 +static struct qtmsg *FDECL(msg_in, (struct qtmsg *, int)); +#endif short quest_info(typ) @@ -188,6 +190,7 @@ char who, /* 'd' => deity, 'l' => leader, 'n' => nemesis, 'o' => artifact */ return; } +#if 0 static struct qtmsg * msg_in(qtm_list, msgnum) struct qtmsg *qtm_list; @@ -201,6 +204,7 @@ int msgnum; return (struct qtmsg *) 0; } +#endif static void convert_arg(c) @@ -428,7 +432,7 @@ int how; static boolean skip_pager(common) -boolean common; +boolean common UNUSED; { /* WIZKIT: suppress plot feedback if starting with quest artifact */ if (g.program_state.wizkit_wishing) diff --git a/util/makedefs.c b/util/makedefs.c index c4599bf96..bb4b1fca3 100644 --- a/util/makedefs.c +++ b/util/makedefs.c @@ -1,4 +1,4 @@ -/* NetHack 3.6 makedefs.c $NHDT-Date: 1562180226 2019/07/03 18:57:06 $ $NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.149 $ */ +/* NetHack 3.6 makedefs.c $NHDT-Date: 1574634383 2019/11/24 22:26:23 $ $NHDT-Branch: paxed-quest-lua $:$NHDT-Revision: 1.163 $ */ /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */ /*-Copyright (c) Kenneth Lorber, Kensington, Maryland, 2015. */ /* Copyright (c) M. Stephenson, 1990, 1991. */ @@ -1196,16 +1196,6 @@ do_date() #if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_HOST) Fprintf(ofp, "\n#if !defined(CROSSCOMPILE) || defined(CROSSCOMPILE_HOST)\n"); -#if 0 - Fprintf(ofp, "/* On a CROSSCOMPILE build, NetHack is built in two steps:\n"); - Fprintf(ofp, " *%s%d. %s\n", - ind, ++steps, "Build makedefs and its prerequisites, and"); - Fprintf(ofp, " *%s %s\n", - ind, "execute makedefs to generate date.h, onames.h, and pm.h."); - Fprintf(ofp, " *%s%d. %s\n *%s %s\n */\n\n", ind, ++steps, - "Build the rest of NetHack using the cross-compiler", - ind, "to generate the game code for target platform."); -#endif #endif /* CROSSCOMPILE || CROSSCOMPILE_HOST */ if (date_via_env) Fprintf(ofp, "#define SOURCE_DATE_EPOCH (%lu%s) /* via getenv() */\n",