lol
at 17.09-beta 117 lines 6.4 kB view raw
1diff --git a/src/main/cpp/locationinfo.cpp b/src/main/cpp/locationinfo.cpp 2index e76ea29..bd22a1d 100644 3--- a/src/main/cpp/locationinfo.cpp 4+++ b/src/main/cpp/locationinfo.cpp 5@@ -149,18 +149,21 @@ void LocationInfo::write(ObjectOutputStream& os, Pool& p) const { 6 os.writeNull(p); 7 } else { 8 char prolog[] = { 9- 0x72, 0x00, 0x21, 0x6F, 0x72, 0x67, 0x2E, 10- 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2E, 0x6C, 11- 0x6F, 0x67, 0x34, 0x6A, 0x2E, 0x73, 0x70, 0x69, 12- 0x2E, 0x4C, 0x6F, 0x63, 0x61, 0x74, 0x69, 0x6F, 13- 0x6E, 0x49, 0x6E, 0x66, 0x6F, 0xED, 0x99, 0xBB, 14- 0xE1, 0x4A, 0x91, 0xA5, 0x7C, 0x02, 0x00, 0x01, 15- 0x4C, 0x00, 0x08, 0x66, 0x75, 0x6C, 0x6C, 0x49, 16- 0x6E, 0x66, 0x6F, 17- 0x74, 0x00, 0x12, 0x4C, 0x6A, 18- 0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67, 19- 0x2F, 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x3B, 20- 0x78, 0x70 }; 21+ 0x72, 22+ 0x00, 23+ 0x21, 0x6F, 0x72, 0x67, 0x2E, 0x61, 0x70, 0x61, 0x63, 0x68, 0x65, 0x2E, 24+ 0x6C, 0x6F, 0x67, 0x34, 0x6A, 0x2E, 0x73, 0x70, 0x69, 0x2E, 0x4C, 0x6F, 25+ 0x63, 0x61, 0x74, 0x69, 0x6F, 0x6E, 0x49, 0x6E, 0x66, 0x6F, static_cast<char>(0xED), 26+ static_cast<char>(0x99), static_cast<char>(0xBB), static_cast<char>(0xE1), 27+ 0x4A, static_cast<char>(0x91), static_cast<char>(0xA5), 0x7C, 0x02, 28+ 0x00, 29+ 0x01, 0x4C, 30+ 0x00, 31+ 0x08, 0x66, 0x75, 0x6C, 0x6C, 0x49, 0x6E, 0x66, 0x6F, 0x74, 32+ 0x00, 33+ 0x12, 0x4C, 0x6A, 0x61, 0x76, 0x61, 0x2F, 0x6C, 0x61, 0x6E, 0x67, 0x2F, 34+ 0x53, 0x74, 0x72, 0x69, 0x6E, 0x67, 0x3B, 0x78, 0x70 35+ }; 36 os.writeProlog("org.apache.log4j.spi.LocationInfo", 2, prolog, sizeof(prolog), p); 37 char* line = p.itoa(lineNumber); 38 // 39diff --git a/src/main/cpp/loggingevent.cpp b/src/main/cpp/loggingevent.cpp 40index 1c0d4be..edbf40b 100644 41--- a/src/main/cpp/loggingevent.cpp 42+++ b/src/main/cpp/loggingevent.cpp 43@@ -242,7 +242,7 @@ void LoggingEvent::writeProlog(ObjectOutputStream& os, Pool& p) { 44 0x68, 0x65, 0x2E, 0x6C, 0x6F, 0x67, 0x34, 0x6A, 45 0x2E, 0x73, 0x70, 0x69, 0x2E, 0x4C, 0x6F, 0x67, 46 0x67, 0x69, 0x6E, 0x67, 0x45, 0x76, 0x65, 0x6E, 47- 0x74, 0xF3, 0xF2, 0xB9, 0x23, 0x74, 0x0B, 0xB5, 48+ 0x74, static_cast<char>(0xF3), static_cast<char>(0xF2), static_cast<char>(0xB9), 0x23, 0x74, 0x0B, static_cast<char>(0xB5), 49 0x3F, 0x03, 0x00, 0x0A, 0x5A, 0x00, 0x15, 0x6D, 50 0x64, 0x63, 0x43, 0x6F, 0x70, 0x79, 0x4C, 0x6F, 51 0x6F, 0x6B, 0x75, 0x70, 0x52, 0x65, 0x71, 0x75, 52diff --git a/src/main/cpp/objectoutputstream.cpp b/src/main/cpp/objectoutputstream.cpp 53index 7cd696b..5442420 100644 54--- a/src/main/cpp/objectoutputstream.cpp 55+++ b/src/main/cpp/objectoutputstream.cpp 56@@ -36,7 +36,7 @@ ObjectOutputStream::ObjectOutputStream(OutputStreamPtr outputStream, Pool& p) 57 objectHandle(0x7E0000), 58 classDescriptions(new ClassDescriptionMap()) 59 { 60- char start[] = { 0xAC, 0xED, 0x00, 0x05 }; 61+ char start[] = { static_cast<char>(0xAC), static_cast<char>(0xED), 0x00, 0x05 }; 62 ByteBuffer buf(start, sizeof(start)); 63 os->write(buf, p); 64 } 65@@ -81,15 +81,15 @@ void ObjectOutputStream::writeObject(const MDC::Map& val, Pool& p) { 66 // 67 // TC_OBJECT and the classDesc for java.util.Hashtable 68 // 69- char prolog[] = { 70- 0x72, 0x00, 0x13, 0x6A, 0x61, 0x76, 0x61, 71- 0x2E, 0x75, 0x74, 0x69, 0x6C, 0x2E, 0x48, 0x61, 72- 0x73, 0x68, 0x74, 0x61, 0x62, 0x6C, 0x65, 0x13, 73- 0xBB, 0x0F, 0x25, 0x21, 0x4A, 0xE4, 0xB8, 0x03, 74- 0x00, 0x02, 0x46, 0x00, 0x0A, 0x6C, 0x6F, 0x61, 75- 0x64, 0x46, 0x61, 0x63, 0x74, 0x6F, 0x72, 0x49, 76- 0x00, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 77- 0x6F, 0x6C, 0x64, 0x78, 0x70 }; 78+ char prolog[] = { 79+ 0x72, 0x00, 0x13, 0x6A, 0x61, 0x76, 0x61, 80+ 0x2E, 0x75, 0x74, 0x69, 0x6C, 0x2E, 0x48, 0x61, 81+ 0x73, 0x68, 0x74, 0x61, 0x62, 0x6C, 0x65, 0x13, 82+ static_cast<char>(0xBB), 0x0F, 0x25, 0x21, 0x4A, static_cast<char>(0xE4), static_cast<char>(0xB8), 0x03, 83+ 0x00, 0x02, 0x46, 0x00, 0x0A, 0x6C, 0x6F, 0x61, 84+ 0x64, 0x46, 0x61, 0x63, 0x74, 0x6F, 0x72, 0x49, 85+ 0x00, 0x09, 0x74, 0x68, 0x72, 0x65, 0x73, 0x68, 86+ 0x6F, 0x6C, 0x64, 0x78, 0x70 }; 87 writeProlog("java.util.Hashtable", 1, prolog, sizeof(prolog), p); 88 // 89 // loadFactor = 0.75, threshold = 5, blockdata start, buckets.size = 7 90diff --git a/src/test/cpp/xml/domtestcase.cpp b/src/test/cpp/xml/domtestcase.cpp 91index a500628..29d67dd 100644 92--- a/src/test/cpp/xml/domtestcase.cpp 93+++ b/src/test/cpp/xml/domtestcase.cpp 94@@ -190,9 +190,9 @@ public: 95 DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase3.xml")); 96 LOG4CXX_INFO(logger, "File name is expected to end with a superscript 3"); 97 #if LOG4CXX_LOGCHAR_IS_UTF8 98- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xC2, 0xB3, 0 }; 99+ const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xC2), static_cast<logchar>(0xB3), 0 }; 100 #else 101- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xB3, 0 }; 102+ const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0xB3), 0 }; 103 #endif 104 File file; 105 file.setPath(fname); 106@@ -209,9 +209,9 @@ public: 107 DOMConfigurator::configure(LOG4CXX_TEST_STR("input/xml/DOMTestCase4.xml")); 108 LOG4CXX_INFO(logger, "File name is expected to end with an ideographic 4"); 109 #if LOG4CXX_LOGCHAR_IS_UTF8 110- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0xE3, 0x86, 0x95, 0 }; 111+ 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 }; 112 #else 113- const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, 0x3195, 0 }; 114+ const logchar fname[] = { 0x6F, 0x75, 0x74, 0x70, 0x75, 0x74, 0x2F, 0x64, 0x6F, 0x6D, static_cast<logchar>(0x3195), 0 }; 115 #endif 116 File file; 117 file.setPath(fname);