[mednafen] 02/07: Disambiguate a call to abs() to allow building with GCC 6.

Stephen Kitt skitt at moszumanska.debian.org
Sun Jul 24 18:56:44 UTC 2016


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

skitt pushed a commit to branch master
in repository mednafen.

commit bcd0b207a61986692a3e7766698c27b40a14fec1
Author: Stephen Kitt <steve at sk2.org>
Date:   Sun Jul 24 18:38:55 2016 +0200

    Disambiguate a call to abs() to allow building with GCC 6.
---
 debian/changelog           |  2 ++
 debian/patches/gcc-6.patch | 14 ++++++++++++++
 debian/patches/series      |  1 +
 3 files changed, 17 insertions(+)

diff --git a/debian/changelog b/debian/changelog
index c4dc5ac..913e7b0 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,6 +1,8 @@
 mednafen (0.9.38.7+dfsg-2) UNRELEASED; urgency=medium
 
   * Switch to https: VCS URIs (see #810378).
+  * Disambiguate a call to abs() to allow building with GCC 6 (closes:
+    #831205).
 
  -- Stephen Kitt <skitt at debian.org>  Fri, 22 Jan 2016 19:02:45 +0100
 
diff --git a/debian/patches/gcc-6.patch b/debian/patches/gcc-6.patch
new file mode 100644
index 0000000..3f0a67b
--- /dev/null
+++ b/debian/patches/gcc-6.patch
@@ -0,0 +1,14 @@
+Description: Disambiguate abs() to build with GCC 6
+Author: Stephen Kitt <skitt at debian.org>
+
+--- a/src/cdrom/CDAccess_CCD.cpp
++++ b/src/cdrom/CDAccess_CCD.cpp
+@@ -346,7 +346,7 @@
+      if(prev_lba != INT_MAX && abs(lba - prev_lba) > 100)
+       throw MDFN_Error(0, _("Garbage subchannel Q data detected(excessively large jump in AMSF)"));
+ 
+-     if(abs(lba - s) > 100)
++     if(abs((int) (lba - s)) > 100)
+       throw MDFN_Error(0, _("Garbage subchannel Q data detected(AMSF value is out of tolerance)"));
+ 
+      prev_lba = lba;
diff --git a/debian/patches/series b/debian/patches/series
index 593166b..7d6dd78 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,3 +1,4 @@
 use-system-tremor.patch
 use-system-mpcdec.patch
 use-system-trio.patch
+gcc-6.patch

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



More information about the Pkg-games-commits mailing list