diff --git a/Data/ODBC/testsuite/src/SQLExecutor.cpp b/Data/ODBC/testsuite/src/SQLExecutor.cpp index 6e2cc4188..6d3728a27 100644 --- a/Data/ODBC/testsuite/src/SQLExecutor.cpp +++ b/Data/ODBC/testsuite/src/SQLExecutor.cpp @@ -4198,12 +4198,12 @@ void SQLExecutor::insertStatReuse() Nullable age(0); stat << "INSERT INTO " << ExecUtil::person() << "(LastName, FirstName, Address, Age) VALUES (?,?,?,?)", use(lastName), use(firstName), use(address), use(age); stat.insertHint(); - for (size_t i = 1; i < 5; ++i) + for (int i = 1; i < 5; ++i) { lastName = Var("Last Name " + NumberFormatter::format(i)); firstName = "First Name " + NumberFormatter::format(i); address = "Address" + NumberFormatter::format(i); - age = 10 + static_cast(i); + age = 10 + i; stat.execute(); } std::vector rowCnt; diff --git a/Data/testsuite/src/DataTest.cpp b/Data/testsuite/src/DataTest.cpp index ec91c3774..650bbc39f 100644 --- a/Data/testsuite/src/DataTest.cpp +++ b/Data/testsuite/src/DataTest.cpp @@ -347,9 +347,10 @@ void DataTest::writeToCLOB(BinaryWriter& writer) writer << (unsigned short) 50000; writer << -123456; writer << (unsigned) 123456; +#ifndef POCO_LONG_IS_64_BIT writer << (long) -1234567890; writer << (unsigned long) 1234567890; - +#endif // POCO_LONG_IS_64_BIT writer << (Int64) -1234567890; writer << (UInt64) 1234567890; @@ -405,7 +406,7 @@ void DataTest::readFromCLOB(BinaryReader& reader) unsigned uintv = 0; reader >> uintv; assert (uintv == 123456); - +#ifndef POCO_LONG_IS_64_BIT long longv = 0; reader >> longv; assert (longv == -1234567890); @@ -413,7 +414,7 @@ void DataTest::readFromCLOB(BinaryReader& reader) unsigned long ulongv = 0; reader >> ulongv; assert (ulongv == 1234567890); - +#endif // POCO_LONG_IS_64_BIT Int64 int64v = 0; reader >> int64v; assert (int64v == -1234567890); diff --git a/MongoDB/src/KillCursorsRequest.cpp b/MongoDB/src/KillCursorsRequest.cpp index 912d18e98..b100b511c 100644 --- a/MongoDB/src/KillCursorsRequest.cpp +++ b/MongoDB/src/KillCursorsRequest.cpp @@ -35,7 +35,7 @@ KillCursorsRequest::~KillCursorsRequest() void KillCursorsRequest::buildRequest(BinaryWriter& writer) { writer << 0; // 0 - reserved for future use - writer << _cursors.size(); + writer << static_cast(_cursors.size()); for (std::vector::iterator it = _cursors.begin(); it != _cursors.end(); ++it) { writer << *it; diff --git a/Net/src/HTTPChunkedStream.cpp b/Net/src/HTTPChunkedStream.cpp index 18158cf7d..f578d1784 100644 --- a/Net/src/HTTPChunkedStream.cpp +++ b/Net/src/HTTPChunkedStream.cpp @@ -93,7 +93,7 @@ int HTTPChunkedStreamBuf::readFromDevice(char* buffer, std::streamsize length) int HTTPChunkedStreamBuf::writeToDevice(const char* buffer, std::streamsize length) { _chunkBuffer.clear(); - NumberFormatter::appendHex(_chunkBuffer, length); + NumberFormatter::appendHex(_chunkBuffer, static_cast(length)); _chunkBuffer.append("\r\n", 2); _chunkBuffer.append(buffer, static_cast(length)); _chunkBuffer.append("\r\n", 2); diff --git a/Net/src/HTTPMessage.cpp b/Net/src/HTTPMessage.cpp index debda04c3..2254b7782 100644 --- a/Net/src/HTTPMessage.cpp +++ b/Net/src/HTTPMessage.cpp @@ -69,7 +69,7 @@ void HTTPMessage::setVersion(const std::string& version) void HTTPMessage::setContentLength(std::streamsize length) { if (length != UNKNOWN_CONTENT_LENGTH) - set(CONTENT_LENGTH, NumberFormatter::format(length)); + set(CONTENT_LENGTH, NumberFormatter::format(static_cast(length))); else erase(CONTENT_LENGTH); } diff --git a/Net/src/OAuth10Credentials.cpp b/Net/src/OAuth10Credentials.cpp index c0f6f01c7..378f2275a 100644 --- a/Net/src/OAuth10Credentials.cpp +++ b/Net/src/OAuth10Credentials.cpp @@ -261,7 +261,7 @@ void OAuth10Credentials::signHMACSHA1(Poco::Net::HTTPRequest& request, const std std::string timestamp(_timestamp); if (timestamp.empty()) { - timestamp = Poco::NumberFormatter::format(Poco::Timestamp().epochTime()); + timestamp = Poco::NumberFormatter::format(static_cast(Poco::Timestamp().epochTime())); } std::string signature(createSignature(request, uri, params, nonce, timestamp)); diff --git a/Net/src/RemoteSyslogChannel.cpp b/Net/src/RemoteSyslogChannel.cpp index 1b11a34b1..9e6e8642c 100644 --- a/Net/src/RemoteSyslogChannel.cpp +++ b/Net/src/RemoteSyslogChannel.cpp @@ -134,7 +134,7 @@ void RemoteSyslogChannel::log(const Message& msg) m += ' '; m += _name; m += ' '; - Poco::NumberFormatter::append(m, msg.getPid()); + Poco::NumberFormatter::append(m, static_cast(msg.getPid())); m += ' '; m += msg.getSource(); } diff --git a/Net/src/SMTPChannel.cpp b/Net/src/SMTPChannel.cpp index a498179a4..349a7c90f 100644 --- a/Net/src/SMTPChannel.cpp +++ b/Net/src/SMTPChannel.cpp @@ -111,7 +111,7 @@ void SMTPChannel::log(const Message& msg) content << "Timestamp: " << DateTimeFormatter::format(msg.getTime(), DateTimeFormat::RFC822_FORMAT) << "\r\n"; content << "Priority: " << NumberFormatter::format(msg.getPriority()) << "\r\n" - << "Process ID: " << NumberFormatter::format(msg.getPid()) << "\r\n" + << "Process ID: " << msg.getPid() << "\r\n" << "Thread: " << msg.getThread() << " (ID: " << msg.getTid() << ")\r\n" << "Message text: " << msg.getText() << "\r\n\r\n"; diff --git a/Redis/include/Poco/Redis/Type.h b/Redis/include/Poco/Redis/Type.h index ba04ae660..5bbbdbc3a 100644 --- a/Redis/include/Poco/Redis/Type.h +++ b/Redis/include/Poco/Redis/Type.h @@ -201,7 +201,7 @@ struct RedisTypeTraits { std::string s = value.value(); return marker - + NumberFormatter::format(s.length()) + + NumberFormatter::format(static_cast(s.length())) + LineEnding::NEWLINE_CRLF + s + LineEnding::NEWLINE_CRLF; diff --git a/XML/src/xmlparse.cpp b/XML/src/xmlparse.cpp index 967659394..46df150c2 100644 --- a/XML/src/xmlparse.cpp +++ b/XML/src/xmlparse.cpp @@ -932,7 +932,7 @@ ENTROPY_DEBUG(const char * label, unsigned long entropy) { static unsigned long generate_hash_secret_salt(XML_Parser parser) { - unsigned long entropy; + Poco::UInt64 entropy; (void)parser; #if defined(EXPAT_POCO) Poco::RandomInputStream rstr;