Control: tag -1 + pending patch

On Sun, 09 Apr 2017 21:10:51 +0300, Adrian Bunk wrote:

> mimetic FTBFS on architectures where char is unsigned
> (originally reported by Frederic Bonnard):
> 
> ...
> base64.cxx:30:1: error: narrowing conversion of '-1' from 'int' to 'char' 
> inside { } [-Wnarrowing]
> base64.cxx:30:1: error: narrowing conversion of '-1' from 'int' to 'char' 
> inside { } [-Wnarrowing]
> base64.cxx:30:1: error: narrowing conversion of '-1' from 'int' to 'char' 
> inside { } [-Wnarrowing]
> base64.cxx:30:1: error: narrowing conversion of '-1' from 'int' to 'char' 
> inside { } [-Wnarrowing]
> base64.cxx:30:1: error: narrowing conversion of '-1' from 'int' to 'char' 
> inside { } [-Wnarrowing]
> base64.cxx:30:1: error: narrowing conversion of '-1' from 'int' to 'char' 
> inside { } [-Wnarrowing]
> ...

Thanks.

I'm in contact with upstream, and I'm attaching a preliminary patch
which makes the package build (including passing tests) on plummer
(ppc64el porterbox). Reviews welcome.


Cheers,
gregor

-- 
 .''`.  https://info.comodo.priv.at/ - Debian Developer https://www.debian.org
 : :' : OpenPGP fingerprint D1E1 316E 93A7 60A8 104D  85FA BB3A 6801 8649 AA06
 `. `'  Member of VIBE!AT & SPI, fellow of the Free Software Foundation Europe
   `-   NP: Tom Waits: Day After Tomorrow
diff -Nru mimetic-0.9.8/debian/changelog mimetic-0.9.8/debian/changelog
--- mimetic-0.9.8/debian/changelog	2016-01-15 15:29:38.000000000 +0100
+++ mimetic-0.9.8/debian/changelog	2017-04-10 20:05:28.000000000 +0200
@@ -1,3 +1,11 @@
+mimetic (0.9.8-5) UNRELEASED; urgency=medium
+
+  * Add patch signed-char.patch to fix build failure on architectures
+    where char is unsigned.
+    Thanks to Adrian Bunk for the bug report. (Closes: #859963)
+
+ -- gregor herrmann <gre...@debian.org>  Mon, 10 Apr 2017 20:05:28 +0200
+
 mimetic (0.9.8-4) unstable; urgency=medium
 
   * debian/rules: change dh_strip argument from --ddeb-migration to
diff -Nru mimetic-0.9.8/debian/patches/series mimetic-0.9.8/debian/patches/series
--- mimetic-0.9.8/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ mimetic-0.9.8/debian/patches/series	2017-04-10 20:05:28.000000000 +0200
@@ -0,0 +1 @@
+signed-char.patch
diff -Nru mimetic-0.9.8/debian/patches/signed-char.patch mimetic-0.9.8/debian/patches/signed-char.patch
--- mimetic-0.9.8/debian/patches/signed-char.patch	1970-01-01 01:00:00.000000000 +0100
+++ mimetic-0.9.8/debian/patches/signed-char.patch	2017-04-10 20:05:28.000000000 +0200
@@ -0,0 +1,31 @@
+Description: fix FTBFS on architectures where char is unsigned
+ Fix error
+   base64.cxx:30:1: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing]
+ by making Base64::sDecTable a signed char.
+Bug-Debian: https://bugs.debian.org/859963
+Forwarded: via email
+Author: gregor herrmann <gre...@debian.org>
+Last-Update: 2017-04-10
+
+--- a/mimetic/codec/base64.cxx
++++ b/mimetic/codec/base64.cxx
+@@ -13,7 +13,7 @@
+     "abcdefghijklmnopqrstuvwxyz"
+     "0123456789+/=";
+ 
+-const char Base64::sDecTable[] = {
++const signed char Base64::sDecTable[] = {
+         -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+         -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+         -1,-1,-1,-1,-1,-1,-1,-1,-1,-1,
+--- a/mimetic/codec/base64.h
++++ b/mimetic/codec/base64.h
+@@ -20,7 +20,7 @@
+     enum { default_maxlen = 76 };
+     enum { eq_sign = 100 };
+     static const char sEncTable[];
+-    static const char sDecTable[];
++    static const signed char sDecTable[];
+     static const int sDecTableSz;
+ public:
+     class Encoder; class Decoder;

Attachment: signature.asc
Description: Digital Signature

Reply via email to