diff options
author | Jose <jose@zeroc.com> | 2019-06-22 00:29:53 +0200 |
---|---|---|
committer | Jose <jose@zeroc.com> | 2019-06-22 00:29:53 +0200 |
commit | c5959fd09de61604bedd75354401df6a57395d65 (patch) | |
tree | 3b0227f631c8b20fb1a1a274b92f63f52f34af2c /cpp/src/Ice/Instance.cpp | |
parent | Small fix (diff) | |
parent | Enable -Wconversion with clang - Close #363 (diff) | |
download | ice-c5959fd09de61604bedd75354401df6a57395d65.tar.bz2 ice-c5959fd09de61604bedd75354401df6a57395d65.tar.xz ice-c5959fd09de61604bedd75354401df6a57395d65.zip |
Merge remote-tracking branch 'origin/3.7' into swift
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r-- | cpp/src/Ice/Instance.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index 240fe7c867e..e0c06b52a9b 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -1037,7 +1037,7 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi throw SyscallException(__FILE__, __LINE__, getSystemErrno()); } - if(initgroups(pw->pw_name, pw->pw_gid) == -1) + if(initgroups(pw->pw_name, static_cast<int>(pw->pw_gid)) == -1) { throw SyscallException(__FILE__, __LINE__, getSystemErrno()); } @@ -1122,8 +1122,13 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi #endif if(!logfile.empty()) { - _initData.logger = ICE_MAKE_SHARED(LoggerI, _initData.properties->getProperty("Ice.ProgramName"), logfile, true, - _initData.properties->getPropertyAsIntWithDefault("Ice.LogFile.SizeMax", 0)); + Int sz = _initData.properties->getPropertyAsIntWithDefault("Ice.LogFile.SizeMax", 0); + if(sz < 0) + { + sz = 0; + } + _initData.logger = ICE_MAKE_SHARED(LoggerI, _initData.properties->getProperty("Ice.ProgramName"), + logfile, true, static_cast<size_t>(sz)); } else { @@ -1180,7 +1185,7 @@ IceInternal::Instance::Instance(const CommunicatorPtr& communicator, const Initi Int num = _initData.properties->getPropertyAsIntWithDefault("Ice.BatchAutoFlushSize", 1024); // 1MB default if(num < 1) { - const_cast<size_t&>(_batchAutoFlushSize) = num; + const_cast<size_t&>(_batchAutoFlushSize) = static_cast<size_t>(num); } else if(static_cast<size_t>(num) > static_cast<size_t>(0x7fffffff / 1024)) { |