Skip to content

Commit

Permalink
Merge pull request #2 from lsst/tickets/DM-8026
Browse files Browse the repository at this point in the history
DM-8026: gcc 6.2 compatibility fixes
  • Loading branch information
fritzm committed Oct 20, 2016
2 parents e820ae3 + 63ea8cf commit 758b5a6
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions patches/narrowing.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
diff -ru apache-log4cxx-0.10.0.orig/src/main/cpp/locationinfo.cpp apache-log4cxx-0.10.0/src/main/cpp/locationinfo.cpp
--- apache-log4cxx-0.10.0.orig/src/main/cpp/locationinfo.cpp 2008-03-31 15:34:09.000000000 -0700
+++ apache-log4cxx-0.10.0/src/main/cpp/locationinfo.cpp 2016-10-18 18:43:38.452052348 -0700
@@ -153,8 +153,8 @@
0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2E, 0x6C,
0x6F, 0x67, 0x34, 0x6A, 0x2E, 0x73, 0x70, 0x69,
0x2E, 0x4C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F,
- 0x6E, 0x49, 0x6E, 0x66, 0x6F, 0xED, 0x99, 0xBB,
- 0xE1, 0x4A, 0x91, 0xA5, 0x7C, 0x02, 0x00, 0x01,
+ 0x6E, 0x49, 0x6E, 0x66, 0x6F, static_cast<char>(0xED), static_cast<char>(0x99), static_cast<char>(0xBB),
+ static_cast<char>(0xE1), 0x4A, static_cast<char>(0x91), static_cast<char>(0xA5), 0x7C, 0x02, 0x00, 0x01,
0x4C, 0x00, 0x08, 0x66, 0x75, 0x6C, 0x6C, 0x49,
0x6E, 0x66, 0x6F,
0x74, 0x00, 0x12, 0x4C, 0x6A,
diff -ru apache-log4cxx-0.10.0.orig/src/main/cpp/loggingevent.cpp apache-log4cxx-0.10.0/src/main/cpp/loggingevent.cpp
--- apache-log4cxx-0.10.0.orig/src/main/cpp/loggingevent.cpp 2008-03-31 15:34:09.000000000 -0700
+++ apache-log4cxx-0.10.0/src/main/cpp/loggingevent.cpp 2016-10-18 18:45:57.099842332 -0700
@@ -242,7 +242,7 @@
0x68, 0x65, 0x2E, 0x6C, 0x6F, 0x67, 0x34, 0x6A,
0x2E, 0x73, 0x70, 0x69, 0x2E, 0x4C, 0x6F, 0x67,
0x67, 0x69, 0x6E, 0x67, 0x45, 0x76, 0x65, 0x6E,
- 0x74, 0xF3, 0xF2, 0xB9, 0x23, 0x74, 0x0B, 0xB5,
+ 0x74, static_cast<char>(0xF3), static_cast<char>(0xF2), static_cast<char>(0xB9), 0x23, 0x74, 0x0B, static_cast<char>(0xB5),
0x3F, 0x03, 0x00, 0x0A, 0x5A, 0x00, 0x15, 0x6D,
0x64, 0x63, 0x43, 0x6F, 0x70, 0x79, 0x4C, 0x6F,
0x6F, 0x6B, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75,
diff -ru apache-log4cxx-0.10.0.orig/src/main/cpp/objectoutputstream.cpp apache-log4cxx-0.10.0/src/main/cpp/objectoutputstream.cpp
--- apache-log4cxx-0.10.0.orig/src/main/cpp/objectoutputstream.cpp 2008-03-31 15:34:09.000000000 -0700
+++ apache-log4cxx-0.10.0/src/main/cpp/objectoutputstream.cpp 2016-10-18 18:43:38.452052348 -0700
@@ -36,7 +36,7 @@
objectHandle(0x7E0000),
classDescriptions(new ClassDescriptionMap())
{
- char start[] = { 0xAC, 0xED, 0x00, 0x05 };
+ char start[] = { static_cast<char>(0xAC), static_cast<char>(0xED), 0x00, 0x05 };
ByteBuffer buf(start, sizeof(start));
os->write(buf, p);
}
@@ -85,7 +85,7 @@
0x72, 0x00, 0x13, 0x6A, 0x61, 0x76, 0x61,
0x2E, 0x75, 0x74, 0x69, 0x6C, 0x2E, 0x48, 0x61,
0x73, 0x68, 0x74, 0x61, 0x62, 0x6C, 0x65, 0x13,
- 0xBB, 0x0F, 0x25, 0x21, 0x4A, 0xE4, 0xB8, 0x03,
+ static_cast<char>(0xBB), 0x0F, 0x25, 0x21, 0x4A, static_cast<char>(0xE4), static_cast<char>(0xB8), 0x03,
0x00, 0x02, 0x46, 0x00, 0x0A, 0x6C, 0x6F, 0x61,
0x64, 0x46, 0x61, 0x63, 0x74, 0x6F, 0x72, 0x49,
0x00, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68,
diff -ru apache-log4cxx-0.10.0.orig/src/test/cpp/xml/domtestcase.cpp apache-log4cxx-0.10.0/src/test/cpp/xml/domtestcase.cpp
--- apache-log4cxx-0.10.0.orig/src/test/cpp/xml/domtestcase.cpp 2008-03-31 15:33:13.000000000 -0700
+++ apache-log4cxx-0.10.0/src/test/cpp/xml/domtestcase.cpp 2016-10-18 18:43:38.452052348 -0700
@@ -190,9 +190,9 @@
DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase3.xml"));
LOG4CXX_INFO(logger, "File name is expected to end with a superscript 3");
#if LOG4CXX_LOGCHAR_IS_UTF8
- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xC2, 0xB3, 0 };
+ const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xC2), static_cast<logchar>(0xB3), 0 };
#else
- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xB3, 0 };
+ const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xB3), 0 };
#endif
File file;
file.setPath(fname);
@@ -209,9 +209,9 @@
DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase4.xml"));
LOG4CXX_INFO(logger, "File name is expected to end with an ideographic 4");
#if LOG4CXX_LOGCHAR_IS_UTF8
- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xE3, 0x86, 0x95, 0 };
+ 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 };
#else
- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0x3195, 0 };
+ const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>0x3195, 0 };
#endif
File file;
file.setPath(fname);

0 comments on commit 758b5a6

Please sign in to comment.