summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/Instance.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src/Ice/Instance.cpp')
-rw-r--r--cpp/src/Ice/Instance.cpp13
1 files changed, 9 insertions, 4 deletions
diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp
index 8d448ee0ddb..1d1d8ce262f 100644
--- a/cpp/src/Ice/Instance.cpp
+++ b/cpp/src/Ice/Instance.cpp
@@ -1033,7 +1033,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());
}
@@ -1107,8 +1107,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
{
@@ -1165,7 +1170,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))
{