From d34bab1509d344fbcb9ec7d7d7c86c2228ce7507 Mon Sep 17 00:00:00 2001 From: "Derek S. Ray" Date: Sun, 15 Feb 2015 14:45:36 -0500 Subject: [PATCH 1/3] more win32-specific pieces --- .gitignore | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.gitignore b/.gitignore index db3e64482..302497de0 100644 --- a/.gitignore +++ b/.gitignore @@ -39,6 +39,10 @@ Nethack.sdf Nethack.opensdf Makefile.bcc Makefile.gcc +Makefile-orig +Makefile.bcc-orig +Makefile.gcc-orig +*.suo *.pdb *.ilk # Win32-specific ignores end From 862d32c2ec08b137610d595329e0f74f618f973e Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Mon, 16 Feb 2015 00:23:48 -0500 Subject: [PATCH 2/3] Fix a few compiler (clang) warnings. --- include/decl.h | 2 +- src/botl.c | 2 +- sys/share/unixtty.c | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/include/decl.h b/include/decl.h index 2e58cc8b2..e31d76bdb 100644 --- a/include/decl.h +++ b/include/decl.h @@ -341,7 +341,7 @@ E nhwchar toplines[]; #define verbalize1(cstr) verbalize("%s", cstr) #define You_hear1(cstr) You_hear("%s", cstr) #define Sprintf1(buf, cstr) Sprintf(buf, "%s", cstr) -#define panic1(cstr) panic(cstr) +#define panic1(cstr) panic("%s", cstr) #ifndef TCAP_H E struct tc_gbl_data { /* also declared in tcap.h */ diff --git a/src/botl.c b/src/botl.c index d67a8a98b..7ad7224b1 100644 --- a/src/botl.c +++ b/src/botl.c @@ -1353,7 +1353,7 @@ genl_status_init() vals[i] = (char *)alloc(MAXCO); *vals[i] = '\0'; activefields[i] = FALSE; - fieldfmt[i] = FALSE; + fieldfmt[i] = (const char *)0; } /* Use a window for the genl version; backward port compatibility */ WIN_STATUS = create_nhwindow(NHW_STATUS); diff --git a/sys/share/unixtty.c b/sys/share/unixtty.c index c277890ee..f691d5a6f 100644 --- a/sys/share/unixtty.c +++ b/sys/share/unixtty.c @@ -380,6 +380,7 @@ init_sco_cons() #ifdef __linux__ /* via Jesse Thilo and Ben Gertzfield */ # include +# include int linux_flag_console = 0; From 7e93cadc1c962923859d888f6f8be3d13cb0e00e Mon Sep 17 00:00:00 2001 From: Sean Hunt Date: Mon, 16 Feb 2015 00:24:05 -0500 Subject: [PATCH 3/3] Replace && with & in blindness timeout check. Caught by clang. --- src/region.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/region.c b/src/region.c index 6c779098b..914b79e62 100644 --- a/src/region.c +++ b/src/region.c @@ -1052,7 +1052,7 @@ region_safety() pline_The("gas cloud has dissipated."); } /* maybe cure blindness too */ - if ((Blinded && TIMEOUT) == 1L) make_blinded(0L, TRUE); + if ((Blinded & TIMEOUT) == 1L) make_blinded(0L, TRUE); } /*region.c*/