summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/ImplicitContextI.cpp2
-rw-r--r--cpp/src/Ice/Initialize.cpp2
-rw-r--r--cpp/src/Ice/Network.cpp2
-rw-r--r--cpp/src/IceSSL/OpenSSLCertificateI.cpp2
-rw-r--r--cpp/src/IceUtil/Time.cpp4
-rw-r--r--cpp/src/slice2cpp/Gen.cpp36
6 files changed, 10 insertions, 38 deletions
diff --git a/cpp/src/Ice/ImplicitContextI.cpp b/cpp/src/Ice/ImplicitContextI.cpp
index c9d60b2ae4e..82cb8b70ef7 100644
--- a/cpp/src/Ice/ImplicitContextI.cpp
+++ b/cpp/src/Ice/ImplicitContextI.cpp
@@ -471,7 +471,7 @@ PerThreadImplicitContext::clearThreadContext() const
# ifdef _WIN32
if(TlsSetValue(_key, 0) == 0)
{
- IceUtil::ThreadSyscallException(__FILE__, __LINE__, GetLastError());
+ throw IceUtil::ThreadSyscallException(__FILE__, __LINE__, GetLastError());
}
# else
if(int err = pthread_setspecific(_key, 0))
diff --git a/cpp/src/Ice/Initialize.cpp b/cpp/src/Ice/Initialize.cpp
index 1dfd7290b8f..20a0189c3c1 100644
--- a/cpp/src/Ice/Initialize.cpp
+++ b/cpp/src/Ice/Initialize.cpp
@@ -413,7 +413,7 @@ Ice::CommunicatorHolder::operator=(shared_ptr<Communicator> communicator)
}
Ice::CommunicatorHolder&
-Ice::CommunicatorHolder::operator=(CommunicatorHolder&& other)
+Ice::CommunicatorHolder::operator=(CommunicatorHolder&& other) noexcept
{
if(_communicator)
{
diff --git a/cpp/src/Ice/Network.cpp b/cpp/src/Ice/Network.cpp
index f4713ddea3a..a197b15e9fc 100644
--- a/cpp/src/Ice/Network.cpp
+++ b/cpp/src/Ice/Network.cpp
@@ -298,7 +298,7 @@ getLocalAddresses(ProtocolSupport protocol, bool includeLoopback, bool singleAdd
break;
}
- DWORD size;
+ DWORD size = 0;
DWORD rv = GetAdaptersAddresses(family, 0, ICE_NULLPTR, ICE_NULLPTR, &size);
if(rv == ERROR_BUFFER_OVERFLOW)
{
diff --git a/cpp/src/IceSSL/OpenSSLCertificateI.cpp b/cpp/src/IceSSL/OpenSSLCertificateI.cpp
index 430fce90cab..db83275bc22 100644
--- a/cpp/src/IceSSL/OpenSSLCertificateI.cpp
+++ b/cpp/src/IceSSL/OpenSSLCertificateI.cpp
@@ -228,7 +228,7 @@ ASMUtcTimeToTime(const ASN1_UTCTIME* s)
# pragma warning(default:4996) // localtime is depercated
#endif
- IceUtil::Time time = IceUtil::Time::seconds(mktime(&tm) - offset * 60 + tzone);
+ IceUtil::Time time = IceUtil::Time::seconds(mktime(&tm) - IceUtil::Int64(offset) * 60 + tzone);
#ifdef ICE_CPP11_MAPPING
return chrono::system_clock::time_point(chrono::microseconds(time.toMicroSeconds()));
diff --git a/cpp/src/IceUtil/Time.cpp b/cpp/src/IceUtil/Time.cpp
index b53e6757118..bac201a055d 100644
--- a/cpp/src/IceUtil/Time.cpp
+++ b/cpp/src/IceUtil/Time.cpp
@@ -97,7 +97,7 @@ IceUtil::Time::now(Clock clock)
struct timeb tb;
ftime(&tb);
# endif
- return Time(static_cast<Int64>(tb.time) * ICE_INT64(1000000) + tb.millitm * 1000);
+ return Time(static_cast<Int64>(tb.time) * ICE_INT64(1000000) + Int64(tb.millitm) * 1000);
#else
struct timeval tv;
if(gettimeofday(&tv, 0) < 0)
@@ -130,7 +130,7 @@ IceUtil::Time::now(Clock clock)
struct timeb tb;
ftime(&tb);
# endif
- return Time(static_cast<Int64>(tb.time) * ICE_INT64(1000000) + tb.millitm * 1000);
+ return Time(static_cast<Int64>(tb.time) * ICE_INT64(1000000) + Int64(tb.millitm) * 1000);
}
#elif defined(__hppa)
//
diff --git a/cpp/src/slice2cpp/Gen.cpp b/cpp/src/slice2cpp/Gen.cpp
index 49e0e1f3eff..7790ec60bf2 100644
--- a/cpp/src/slice2cpp/Gen.cpp
+++ b/cpp/src/slice2cpp/Gen.cpp
@@ -6392,14 +6392,7 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
{
H << ", ";
}
- if(isMovable((*q)->type()))
- {
- H << "::std::move(" << fixKwd((*q)->name()) << ")";
- }
- else
- {
- H << fixKwd((*q)->name());
- }
+ H << fixKwd((*q)->name());
}
H << ")";
@@ -6425,14 +6418,7 @@ Slice::Gen::Cpp11TypesVisitor::visitExceptionStart(const ExceptionPtr& p)
{
H << ",";
}
- if(isMovable((*q)->type()))
- {
- H << nl << memberName << "(::std::move(" << memberName << "))";
- }
- else
- {
- H << nl << memberName << "(" << memberName << ")";
- }
+ H << nl << memberName << "(" << memberName << ")";
}
H.dec();
@@ -8721,14 +8707,7 @@ Slice::Gen::Cpp11ObjectVisitor::emitVirtualBaseInitializers(const ClassDefPtr& d
{
upcall += ", ";
}
- if(isMovable((*q)->type()))
- {
- upcall += "::std::move(" + fixKwd((*q)->name()) + ")";
- }
- else
- {
- upcall += "" + fixKwd((*q)->name());
- }
+ upcall += "" + fixKwd((*q)->name());
}
upcall += ")";
@@ -8824,14 +8803,7 @@ Slice::Gen::Cpp11ObjectVisitor::emitOneShotConstructor(const ClassDefPtr& p)
H << ',' << nl;
}
string memberName = fixKwd((*q)->name());
- if(isMovable((*q)->type()))
- {
- H << memberName << "(::std::move(" << memberName << "))";
- }
- else
- {
- H << memberName << "(" << memberName << ')';
- }
+ H << memberName << "(" << memberName << ')';
}
H.dec();