Hello community, here is the log from the commit of package wt for openSUSE:Factory checked in at 2015-10-26 12:48:45 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/wt (Old) and /work/SRC/openSUSE:Factory/.wt.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "wt" Changes: -------- --- /work/SRC/openSUSE:Factory/wt/wt.changes 2015-04-23 08:04:38.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.wt.new/wt.changes 2015-10-26 12:48:51.000000000 +0100 @@ -1,0 +2,5 @@ +Wed Oct 21 09:40:00 UTC 2015 - sch...@suse.de + +- base64.patch: Fix invalid narrowing conversion + +------------------------------------------------------------------- New: ---- base64.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ wt.spec ++++++ --- /var/tmp/diff_new_pack.SRhQow/_old 2015-10-26 12:48:52.000000000 +0100 +++ /var/tmp/diff_new_pack.SRhQow/_new 2015-10-26 12:48:52.000000000 +0100 @@ -1,7 +1,7 @@ # # spec file for package wt # -# Copyright (c) 2015 SUSE LINUX Products GmbH, Nuernberg, Germany. +# Copyright (c) 2015 SUSE LINUX GmbH, Nuernberg, Germany. # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -28,6 +28,7 @@ Group: Development/Libraries/C and C++ Url: http://www.webtoolkit.eu/wt/ Source0: https://downloads.sourceforge.net/project/witty/wt/%{version}/wt-%{version}.tar.gz +Patch0: base64.patch BuildRequires: FastCGI-devel # wt will build with boost-devel < 1.36.0 but it won't work BuildRequires: GraphicsMagick-devel @@ -136,6 +137,7 @@ %prep %setup -q +%patch0 -p1 %build %cmake \ ++++++ base64.patch ++++++ >From 6be6533ac650e26f8b53fdc32341b297a1901383 Mon Sep 17 00:00:00 2001 From: Andreas Schwab <sch...@suse.de> Date: Wed, 21 Oct 2015 11:35:43 +0200 Subject: [PATCH] base64: fix invalid narrowing conversion Fixes this error: src/web/base64.cpp:39:3: error: narrowing conversion of '-1' from 'int' to 'char' inside { } [-Wnarrowing] --- src/web/base64.cpp | 32 ++++++++++++++++---------------- src/web/base64.h | 8 ++++---- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/src/web/base64.cpp b/src/web/base64.cpp index 4d507f0..d2e17fe 100644 --- a/src/web/base64.cpp +++ b/src/web/base64.cpp @@ -2,7 +2,7 @@ namespace base64 { - const char _to_table[64] = + const unsigned char _to_table[64] = { 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', @@ -12,30 +12,30 @@ namespace base64 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', '+', '/' }; - const char* to_table = _to_table; + const unsigned char* to_table = _to_table; - const char* to_table_end = + const unsigned char* to_table_end = _to_table + sizeof(_to_table); - const char _from_table[128] = + const unsigned char _from_table[128] = { - -1, -1, -1, -1, -1, -1, -1, -1, // 0 - -1, -1, -1, -1, -1, -1, -1, -1, // 8 - -1, -1, -1, -1, -1, -1, -1, -1, // 16 - -1, -1, -1, -1, -1, -1, -1, -1, // 24 - -1, -1, -1, -1, -1, -1, -1, -1, // 32 - -1, -1, -1, 62, -1, -1, -1, 63, // 40 + 255, 255, 255, 255, 255, 255, 255, 255, // 0 + 255, 255, 255, 255, 255, 255, 255, 255, // 8 + 255, 255, 255, 255, 255, 255, 255, 255, // 16 + 255, 255, 255, 255, 255, 255, 255, 255, // 24 + 255, 255, 255, 255, 255, 255, 255, 255, // 32 + 255, 255, 255, 62, 255, 255, 255, 63, // 40 52, 53, 54, 55, 56, 57, 58, 59, // 48 - 60, 61, -1, -1, -1, 0, -1, -1, // 56 - -1, 0, 1, 2, 3, 4, 5, 6, // 64 + 60, 61, 255, 255, 255, 0, 255, 255, // 56 + 255, 0, 1, 2, 3, 4, 5, 6, // 64 7, 8, 9, 10, 11, 12, 13, 14, // 72 15, 16, 17, 18, 19, 20, 21, 22, // 80 - 23, 24, 25, -1, -1, -1, -1, -1, // 88 - -1, 26, 27, 28, 29, 30, 31, 32, // 96 + 23, 24, 25, 255, 255, 255, 255, 255, // 88 + 255, 26, 27, 28, 29, 30, 31, 32, // 96 33, 34, 35, 36, 37, 38, 39, 40, // 104 41, 42, 43, 44, 45, 46, 47, 48, // 112 - 49, 50, 51, -1, -1, -1, -1, -1 // 120 + 49, 50, 51, 255, 255, 255, 255, 255 // 120 }; - const char* from_table = _from_table; + const unsigned char* from_table = _from_table; } diff --git a/src/web/base64.h b/src/web/base64.h index 7a91981..ccf263e 100644 --- a/src/web/base64.h +++ b/src/web/base64.h @@ -59,9 +59,9 @@ namespace base64 typedef unsigned uint32; typedef unsigned char uint8; - extern WT_API const char* to_table; - extern WT_API const char* to_table_end; - extern WT_API const char* from_table; + extern WT_API const unsigned char* to_table; + extern WT_API const unsigned char* to_table_end; + extern WT_API const unsigned char* from_table; template <class InputIterator, class OutputIterator> void encode(const InputIterator& begin, @@ -136,7 +136,7 @@ namespace base64 chars=0; while((chars<4) && (it != end)) { - uint8 c = static_cast<char>(*it); + uint8 c = static_cast<uint8>(*it); if (c == '=') break; // pad character marks the end of the stream ++it; -- 2.6.2