log4cxx: fix build issue with gcc6+ on architectures with signed char
[buildroot-gz.git] / package / log4cxx / 0005-domtestcase.cpp-fix-narrowing-conversion-compile-err.patch
blobb3f43bfd7c90483b9cc3437beeb9f8323f3bb424
1 From afc191aec355619d6ebabb2cad660a5a8ad4569b Mon Sep 17 00:00:00 2001
2 From: Peter Korsgaard <peter@korsgaard.com>
3 Date: Mon, 30 Jan 2017 23:13:43 +0100
4 Subject: [PATCH] domtestcase.cpp: fix narrowing conversion compile error with
5 gcc 6+ / signed char
7 Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
8 ---
9 src/test/cpp/xml/domtestcase.cpp | 4 ++--
10 1 file changed, 2 insertions(+), 2 deletions(-)
12 diff --git a/src/test/cpp/xml/domtestcase.cpp b/src/test/cpp/xml/domtestcase.cpp
13 index ad276d1a..2a1e6e2e 100644
14 --- a/src/test/cpp/xml/domtestcase.cpp
15 +++ b/src/test/cpp/xml/domtestcase.cpp
16 @@ -190,7 +190,7 @@ public:
17 DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase3.xml"));
18 LOG4CXX_INFO(logger, "File name is expected to end with a superscript 3")
19 #if LOG4CXX_LOGCHAR_IS_UTF8
20 - const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xC2, 0xB3, 0 };
21 + const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xC2), static_cast<logchar>(0xB3), 0 };
22 #else
23 const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xB3, 0 };
24 #endif
25 @@ -209,7 +209,7 @@ public:
26 DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase4.xml"));
27 LOG4CXX_INFO(logger, "File name is expected to end with an ideographic 4")
28 #if LOG4CXX_LOGCHAR_IS_UTF8
29 - const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xE3, 0x86, 0x95, 0 };
30 + const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xE3), static_cast<logchar>(0x86), static_cast<logchar>(0x95), 0 };
31 #else
32 const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0x3195, 0 };
33 #endif
34 --
35 2.11.0