[nethack] 07/31: Add patch to prevent warnings related to the nhUse macro

James Cowgill jcowgill-guest at moszumanska.debian.org
Mon Mar 7 17:54:18 UTC 2016


This is an automated email from the git hooks/post-receive script.

jcowgill-guest pushed a commit to branch master
in repository nethack.

commit 136b3216a09860f9816c1bbb5bfd061284789d0a
Author: James Cowgill <james410 at cowgill.org.uk>
Date:   Mon Mar 7 14:19:10 2016 +0000

    Add patch to prevent warnings related to the nhUse macro
---
 debian/patches/0023-gcc-warning-fixes.patch | 35 +++++++++++++++++++++++++++++
 debian/patches/series                       |  1 +
 2 files changed, 36 insertions(+)

diff --git a/debian/patches/0023-gcc-warning-fixes.patch b/debian/patches/0023-gcc-warning-fixes.patch
new file mode 100644
index 0000000..202f755
--- /dev/null
+++ b/debian/patches/0023-gcc-warning-fixes.patch
@@ -0,0 +1,35 @@
+Description: Fix nhUse macro so it doesn't print warnings
+ The nhUse macro is designed to prevent warnings, but actually produces more
+ when compling on a 64-bit system! Use the standard "(void)" technique to
+ prevent "unused function argument" warnings instead.
+Author: James Cowgill <jcowgill at debian.org>
+Forwarded: no
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/include/lint.h
++++ b/include/lint.h
+@@ -19,11 +19,7 @@
+ #endif
+ 
+ #ifdef FORCE_ARG_USAGE
+-/* force an unused function argument to become used in an arbitrary
+-   manner in order to suppress warning about unused function arguments;
+-   viable for scalar and pointer arguments */
+-#define nhUse(arg) nhUse_dummy += (unsigned) arg;
+-extern unsigned nhUse_dummy;
++#define nhUse(arg) (void) arg
+ #else
+ #define nhUse(arg) /*empty*/
+ #endif
+--- a/src/decl.c
++++ b/src/decl.c
+@@ -335,9 +335,6 @@ struct plinemsg_type *plinemsg_types = (
+ char *ARGV0;
+ #endif
+ 
+-/* support for lint.h */
+-unsigned nhUse_dummy = 0;
+-
+ /* dummy routine used to force linkage */
+ void
+ decl_init()
diff --git a/debian/patches/series b/debian/patches/series
index 6337e5d..bafdac0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,3 +12,4 @@
 0019-stay-in-array-bounds.patch
 0020-fix-64-bit-issues-in-lisp-code.patch
 0021-fix-kfreebsd-ftbfs.patch
+0023-gcc-warning-fixes.patch

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/nethack.git



More information about the Pkg-games-commits mailing list