mirror of
				https://github.com/Telecominfraproject/wlan-cloud-lib-poco.git
				synced 2025-10-31 02:27:56 +00:00 
			
		
		
		
	cmake and gcc warning fixes
This commit is contained in:
		
							
								
								
									
										7
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										7
									
								
								.gitignore
									
									
									
									
										vendored
									
									
								
							| @@ -100,6 +100,13 @@ lib/ | |||||||
| lib64/ | lib64/ | ||||||
| pocomsg.h | pocomsg.h | ||||||
|  |  | ||||||
|  | # Eclipse generated files # | ||||||
|  | ###################### | ||||||
|  | .project | ||||||
|  | .cproject | ||||||
|  | .settings | ||||||
|  | cmake-build/ | ||||||
|  |  | ||||||
| # Temporary files # | # Temporary files # | ||||||
| ################### | ################### | ||||||
| *.bak | *.bak | ||||||
|   | |||||||
| @@ -7,7 +7,7 @@ PROJECT(Poco) | |||||||
|  |  | ||||||
| cmake_minimum_required(VERSION 2.8.0) | cmake_minimum_required(VERSION 2.8.0) | ||||||
|  |  | ||||||
| set(SHARED_LIBRARY_VERSION "15") | set(SHARED_LIBRARY_VERSION "21") | ||||||
|  |  | ||||||
| set(CPACK_PACKAGE_VERSION_MAJOR "1") | set(CPACK_PACKAGE_VERSION_MAJOR "1") | ||||||
| set(CPACK_PACKAGE_VERSION_MINOR "5") | set(CPACK_PACKAGE_VERSION_MINOR "5") | ||||||
| @@ -102,8 +102,9 @@ include(FindOpenSSL) | |||||||
| #include(CMakeDetermineCompilerId) | #include(CMakeDetermineCompilerId) | ||||||
|  |  | ||||||
| include(FindMySQL) | include(FindMySQL) | ||||||
| include(FindAPR) |  | ||||||
| include(FindApache2) | #include(FindAPR) | ||||||
|  | #include(FindApache2) | ||||||
|  |  | ||||||
| # OS Detection | # OS Detection | ||||||
| if(CMAKE_SYSTEM MATCHES "Windows") | if(CMAKE_SYSTEM MATCHES "Windows") | ||||||
|   | |||||||
| @@ -1,5 +1,6 @@ | |||||||
| set( TEST_SRCS | set( TEST_SRCS | ||||||
| src/CryptoTest.cpp | src/CryptoTest.cpp | ||||||
|  | src/DigestEngineTest.cpp | ||||||
| src/CryptoTestSuite.cpp | src/CryptoTestSuite.cpp | ||||||
| src/Driver.cpp | src/Driver.cpp | ||||||
| src/RSATest.cpp | src/RSATest.cpp | ||||||
|   | |||||||
| @@ -31,6 +31,8 @@ set( BASE_SRCS | |||||||
|   src/AsyncChannel.cpp |   src/AsyncChannel.cpp | ||||||
|   src/Base64Decoder.cpp |   src/Base64Decoder.cpp | ||||||
|   src/Base64Encoder.cpp |   src/Base64Encoder.cpp | ||||||
|  |   src/Base32Decoder.cpp | ||||||
|  |   src/Base32Encoder.cpp | ||||||
|   src/BinaryReader.cpp |   src/BinaryReader.cpp | ||||||
|   src/BinaryWriter.cpp |   src/BinaryWriter.cpp | ||||||
|   src/Bugcheck.cpp |   src/Bugcheck.cpp | ||||||
| @@ -50,6 +52,7 @@ set( BASE_SRCS | |||||||
|   src/DigestEngine.cpp |   src/DigestEngine.cpp | ||||||
|   src/DigestStream.cpp |   src/DigestStream.cpp | ||||||
|   src/DirectoryIterator.cpp |   src/DirectoryIterator.cpp | ||||||
|  |   src/DirectoryWatcher.cpp | ||||||
|   src/Environment.cpp |   src/Environment.cpp | ||||||
|   src/Error.cpp |   src/Error.cpp | ||||||
|   src/ErrorHandler.cpp |   src/ErrorHandler.cpp | ||||||
|   | |||||||
| @@ -13,7 +13,7 @@ objects = ArchiveStrategy Ascii ASCIIEncoding AsyncChannel \ | |||||||
| 	BinaryReader BinaryWriter Bugcheck ByteOrder Channel Checksum Configurable ConsoleChannel \ | 	BinaryReader BinaryWriter Bugcheck ByteOrder Channel Checksum Configurable ConsoleChannel \ | ||||||
| 	CountingStream DateTime LocalDateTime DateTimeFormat DateTimeFormatter DateTimeParser \ | 	CountingStream DateTime LocalDateTime DateTimeFormat DateTimeFormatter DateTimeParser \ | ||||||
| 	Debugger DeflatingStream DigestEngine DigestStream DirectoryIterator DirectoryWatcher \ | 	Debugger DeflatingStream DigestEngine DigestStream DirectoryIterator DirectoryWatcher \ | ||||||
| 	Environment Event EventArgs ErrorHandler Exception FIFOBufferStream FPEnvironment File \ | 	Environment Event Error EventArgs ErrorHandler Exception FIFOBufferStream FPEnvironment File \ | ||||||
| 	FileChannel Formatter FormattingChannel Glob HexBinaryDecoder LineEndingConverter \ | 	FileChannel Formatter FormattingChannel Glob HexBinaryDecoder LineEndingConverter \ | ||||||
| 	HexBinaryEncoder InflatingStream Latin1Encoding Latin2Encoding Latin9Encoding LogFile \ | 	HexBinaryEncoder InflatingStream Latin1Encoding Latin2Encoding Latin9Encoding LogFile \ | ||||||
| 	Logger LoggingFactory LoggingRegistry LogStream NamedEvent NamedMutex NullChannel \ | 	Logger LoggingFactory LoggingRegistry LogStream NamedEvent NamedMutex NullChannel \ | ||||||
|   | |||||||
| @@ -349,7 +349,7 @@ bool intToStr(T value, | |||||||
|  |  | ||||||
| 	size = ptr - result; | 	size = ptr - result; | ||||||
| 	poco_assert_dbg (size <= ptr.span()); | 	poco_assert_dbg (size <= ptr.span()); | ||||||
| 	poco_assert_dbg ((-1 == width) || (size >= width)); | 	poco_assert_dbg ((-1 == width) || (size >= size_t(width))); | ||||||
| 	*ptr-- = '\0'; | 	*ptr-- = '\0'; | ||||||
|  |  | ||||||
| 	char* ptrr = result; | 	char* ptrr = result; | ||||||
| @@ -424,7 +424,7 @@ bool uIntToStr(T value, | |||||||
| 	 | 	 | ||||||
| 	size = ptr - result; | 	size = ptr - result; | ||||||
| 	poco_assert_dbg (size <= ptr.span()); | 	poco_assert_dbg (size <= ptr.span()); | ||||||
| 	poco_assert_dbg ((-1 == width) || (size >= width)); | 	poco_assert_dbg ((-1 == width) || (size >= size_t(width))); | ||||||
| 	*ptr-- = '\0'; | 	*ptr-- = '\0'; | ||||||
| 	 | 	 | ||||||
| 	char* ptrr = result; | 	char* ptrr = result; | ||||||
|   | |||||||
| @@ -38,6 +38,7 @@ | |||||||
| #include "Poco/UnicodeConverter.h" | #include "Poco/UnicodeConverter.h" | ||||||
| #include "Poco/Error.h" | #include "Poco/Error.h" | ||||||
| #include <string> | #include <string> | ||||||
|  | #include <string.h> | ||||||
|  |  | ||||||
|  |  | ||||||
| namespace Poco { | namespace Poco { | ||||||
| @@ -66,9 +67,24 @@ namespace Poco { | |||||||
|  |  | ||||||
| 	std::string Error::getMessage(int errorCode) | 	std::string Error::getMessage(int errorCode) | ||||||
| 	{ | 	{ | ||||||
| #error todo | 		/* Reentrant version of `strerror'. | ||||||
| 		char errmsg[256]; | 		   There are 2 flavors of `strerror_r', GNU which returns the string | ||||||
| 		return std::string(strerror_r(errorCode, errMsg, 256)); | 		   and may or may not use the supplied temporary buffer and POSIX one | ||||||
|  | 		   which fills the string into the buffer. | ||||||
|  | 		   To use the POSIX version, -D_XOPEN_SOURCE=600 or -D_POSIX_C_SOURCE=200112L | ||||||
|  | 		   without -D_GNU_SOURCE is needed, otherwise the GNU version is | ||||||
|  | 		   preferred. | ||||||
|  | 		*/ | ||||||
|  | #ifdef _GNU_SOURCE | ||||||
|  | 		char errmsg[256] = ""; | ||||||
|  | 		return std::string(strerror_r(errorCode, errmsg, 256)); | ||||||
|  | #elif (_XOPEN_SOURCE >= 600) | ||||||
|  | 		char errmsg[256] = ""; | ||||||
|  | 		strerror_r(errorCode, errmsg, 256); | ||||||
|  | 		return errmsg; | ||||||
|  | #else | ||||||
|  | 		return std::string(strerror(errorCode)); | ||||||
|  | #endif | ||||||
| 	} | 	} | ||||||
|  |  | ||||||
| #endif | #endif | ||||||
|   | |||||||
| @@ -6,6 +6,7 @@ src/AnyTest.cpp | |||||||
| src/ArrayTest.cpp | src/ArrayTest.cpp | ||||||
| src/AutoPtrTest.cpp | src/AutoPtrTest.cpp | ||||||
| src/AutoReleasePoolTest.cpp | src/AutoReleasePoolTest.cpp | ||||||
|  | src/Base32Test.cpp | ||||||
| src/Base64Test.cpp | src/Base64Test.cpp | ||||||
| src/BasicEventTest.cpp | src/BasicEventTest.cpp | ||||||
| src/BinaryReaderWriterTest.cpp | src/BinaryReaderWriterTest.cpp | ||||||
| @@ -23,6 +24,7 @@ src/DateTimeParserTest.cpp | |||||||
| src/DateTimeTest.cpp | src/DateTimeTest.cpp | ||||||
| src/DateTimeTestSuite.cpp | src/DateTimeTestSuite.cpp | ||||||
| src/DigestStreamTest.cpp | src/DigestStreamTest.cpp | ||||||
|  | src/DirectoryWatcherTest.cpp | ||||||
| src/Driver.cpp | src/Driver.cpp | ||||||
| src/DummyDelegate.cpp | src/DummyDelegate.cpp | ||||||
| src/DynamicFactoryTest.cpp | src/DynamicFactoryTest.cpp | ||||||
|   | |||||||
| @@ -10,7 +10,7 @@ add_library( ${LIBNAME} ${LIB_MODE} ${SRCS} ) | |||||||
| set_target_properties( ${LIBNAME}  | set_target_properties( ${LIBNAME}  | ||||||
| 	PROPERTIES | 	PROPERTIES | ||||||
| 	VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} ) | 	VERSION ${SHARED_LIBRARY_VERSION} SOVERSION ${SHARED_LIBRARY_VERSION} ) | ||||||
| target_link_libraries( ${LIBNAME} PocoFoundation) | target_link_libraries( ${LIBNAME} PocoNet PocoFoundation) | ||||||
|  |  | ||||||
| install( | install( | ||||||
|     DIRECTORY include/Poco |     DIRECTORY include/Poco | ||||||
|   | |||||||
| @@ -49,6 +49,7 @@ set( BASE_SRCS | |||||||
|   src/ICMPSocketImpl.cpp |   src/ICMPSocketImpl.cpp | ||||||
|   src/ICMPv4PacketImpl.cpp |   src/ICMPv4PacketImpl.cpp | ||||||
|   src/IPAddress.cpp |   src/IPAddress.cpp | ||||||
|  |   src/IPAddressImpl.cpp | ||||||
|   src/MailMessage.cpp |   src/MailMessage.cpp | ||||||
|   src/MailRecipient.cpp |   src/MailRecipient.cpp | ||||||
|   src/MailStream.cpp |   src/MailStream.cpp | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Marian Krivos
					Marian Krivos