diff options
author | Jose <pepone@users.noreply.github.com> | 2023-03-08 15:11:46 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-08 15:11:46 +0100 |
commit | 769b9932410049960ace424a9f24d3b3450810f6 (patch) | |
tree | 356a5906c68f6497db749dfa72bf5a61e66d9952 /cpp/src | |
parent | Changelog updates for 3.7.9 release (diff) | |
download | ice-769b9932410049960ace424a9f24d3b3450810f6.tar.bz2 ice-769b9932410049960ace424a9f24d3b3450810f6.tar.xz ice-769b9932410049960ace424a9f24d3b3450810f6.zip |
Xcode 14.3 beta2 build fixes (#1463)
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/ConnectionI.cpp | 4 | ||||
-rw-r--r-- | cpp/src/Ice/Initialize.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/Instance.cpp | 4 | ||||
-rw-r--r-- | cpp/src/Ice/Object.cpp | 2 | ||||
-rw-r--r-- | cpp/src/IceGrid/FileCache.cpp | 2 | ||||
-rw-r--r-- | cpp/src/IceGrid/Grammar.cpp | 1 | ||||
-rw-r--r-- | cpp/src/IceGrid/Grammar.y | 1 | ||||
-rw-r--r-- | cpp/src/IceLocatorDiscovery/PluginI.cpp | 2 | ||||
-rw-r--r-- | cpp/src/IceStorm/Grammar.cpp | 1 | ||||
-rw-r--r-- | cpp/src/IceStorm/Grammar.y | 1 | ||||
-rw-r--r-- | cpp/src/IceUtil/StringConverter.cpp | 6 | ||||
-rw-r--r-- | cpp/src/Slice/Grammar.cpp | 1 | ||||
-rw-r--r-- | cpp/src/Slice/Grammar.y | 1 | ||||
-rw-r--r-- | cpp/src/slice2cs/CsUtil.cpp | 3 | ||||
-rw-r--r-- | cpp/src/slice2java/Gen.cpp | 2 | ||||
-rw-r--r-- | cpp/src/slice2java/GenCompat.cpp | 2 |
16 files changed, 18 insertions, 17 deletions
diff --git a/cpp/src/Ice/ConnectionI.cpp b/cpp/src/Ice/ConnectionI.cpp index 9fa189e089f..281f8824782 100644 --- a/cpp/src/Ice/ConnectionI.cpp +++ b/cpp/src/Ice/ConnectionI.cpp @@ -1083,7 +1083,7 @@ Ice::ConnectionI::setCloseCallback(ICE_IN(ICE_DELEGATE(CloseCallback)) callback) CallbackWorkItem(const ConnectionIPtr& connection, ICE_IN(ICE_DELEGATE(CloseCallback)) callback) : _connection(connection), #ifdef ICE_CPP11_MAPPING - _callback(move(callback)) + _callback(std::move(callback)) #else _callback(callback) #endif @@ -1101,7 +1101,7 @@ Ice::ConnectionI::setCloseCallback(ICE_IN(ICE_DELEGATE(CloseCallback)) callback) const ICE_DELEGATE(CloseCallback) _callback; }; #ifdef ICE_CPP11_MAPPING - _threadPool->dispatch(new CallbackWorkItem(ICE_SHARED_FROM_THIS, move(callback))); + _threadPool->dispatch(new CallbackWorkItem(ICE_SHARED_FROM_THIS, std::move(callback))); #else _threadPool->dispatch(new CallbackWorkItem(ICE_SHARED_FROM_THIS, callback)); #endif diff --git a/cpp/src/Ice/Initialize.cpp b/cpp/src/Ice/Initialize.cpp index 20a0189c3c1..5fd948b533d 100644 --- a/cpp/src/Ice/Initialize.cpp +++ b/cpp/src/Ice/Initialize.cpp @@ -201,7 +201,7 @@ Ice::ThreadHookPlugin::ThreadHookPlugin(const CommunicatorPtr& communicator, } IceInternal::InstancePtr instance = IceInternal::getInstance(communicator); - instance->setThreadHook(move(threadStart), move(threadStop)); + instance->setThreadHook(std::move(threadStart), std::move(threadStop)); } #else Ice::ThreadHookPlugin::ThreadHookPlugin(const CommunicatorPtr& communicator, const ThreadNotificationPtr& threadHook) diff --git a/cpp/src/Ice/Instance.cpp b/cpp/src/Ice/Instance.cpp index 7a1b5952157..f6b3dad4391 100644 --- a/cpp/src/Ice/Instance.cpp +++ b/cpp/src/Ice/Instance.cpp @@ -921,8 +921,8 @@ IceInternal::Instance::setLogger(const Ice::LoggerPtr& logger) void IceInternal::Instance::setThreadHook(function<void()> threadStart, function<void()> threadStop) { - _initData.threadStart = move(threadStart); - _initData.threadStop = move(threadStop); + _initData.threadStart = std::move(threadStart); + _initData.threadStop = std::move(threadStop); } #else void diff --git a/cpp/src/Ice/Object.cpp b/cpp/src/Ice/Object.cpp index 78235ce4d62..83d03a88e2e 100644 --- a/cpp/src/Ice/Object.cpp +++ b/cpp/src/Ice/Object.cpp @@ -130,7 +130,7 @@ Ice::Object::_iceD_ice_isA(Incoming& inS, const Current& current) istr->read(iceP_id, false); inS.endReadParams(); #ifdef ICE_CPP11_MAPPING - bool ret = ice_isA(move(iceP_id), current); + bool ret = ice_isA(std::move(iceP_id), current); #else bool ret = ice_isA(iceP_id, current); #endif diff --git a/cpp/src/IceGrid/FileCache.cpp b/cpp/src/IceGrid/FileCache.cpp index 565e7896e62..110826408c7 100644 --- a/cpp/src/IceGrid/FileCache.cpp +++ b/cpp/src/IceGrid/FileCache.cpp @@ -164,7 +164,7 @@ FileCache::read(const string& file, Ice::Long offset, int size, Ice::Long& newOf int totalSize = 0; string line; - for(int i = 0; is.good(); ++i) + while(is.good()) { getline(is, line); diff --git a/cpp/src/IceGrid/Grammar.cpp b/cpp/src/IceGrid/Grammar.cpp index 93a23d12f24..34291e888e3 100644 --- a/cpp/src/IceGrid/Grammar.cpp +++ b/cpp/src/IceGrid/Grammar.cpp @@ -97,6 +97,7 @@ #if defined(__clang__) # pragma clang diagnostic ignored "-Wconversion" # pragma clang diagnostic ignored "-Wsign-conversion" +# pragma clang diagnostic ignored "-Wunused-but-set-variable" #endif using namespace std; diff --git a/cpp/src/IceGrid/Grammar.y b/cpp/src/IceGrid/Grammar.y index ce7a88bca7f..87aeb0ca9e4 100644 --- a/cpp/src/IceGrid/Grammar.y +++ b/cpp/src/IceGrid/Grammar.y @@ -31,6 +31,7 @@ #if defined(__clang__) # pragma clang diagnostic ignored "-Wconversion" # pragma clang diagnostic ignored "-Wsign-conversion" +# pragma clang diagnostic ignored "-Wunused-but-set-variable" #endif using namespace std; diff --git a/cpp/src/IceLocatorDiscovery/PluginI.cpp b/cpp/src/IceLocatorDiscovery/PluginI.cpp index 864e3c272c8..2b896308bb9 100644 --- a/cpp/src/IceLocatorDiscovery/PluginI.cpp +++ b/cpp/src/IceLocatorDiscovery/PluginI.cpp @@ -646,7 +646,7 @@ LocatorI::ice_invokeAsync(pair<const Ice::Byte*, const Ice::Byte*> inParams, const Ice::Current& current) { invoke(nullptr, make_shared<Request>(this, current.operation, current.mode, inParams, current.ctx, - make_pair(move(responseCB), move(exceptionCB)))); + make_pair(std::move(responseCB), std::move(exceptionCB)))); } #else void diff --git a/cpp/src/IceStorm/Grammar.cpp b/cpp/src/IceStorm/Grammar.cpp index 0673c7b9e2d..668c98c543a 100644 --- a/cpp/src/IceStorm/Grammar.cpp +++ b/cpp/src/IceStorm/Grammar.cpp @@ -97,6 +97,7 @@ #if defined(__clang__) # pragma clang diagnostic ignored "-Wconversion" # pragma clang diagnostic ignored "-Wsign-conversion" +# pragma clang diagnostic ignored "-Wunused-but-set-variable" #endif using namespace std; diff --git a/cpp/src/IceStorm/Grammar.y b/cpp/src/IceStorm/Grammar.y index d7b08996419..24870467795 100644 --- a/cpp/src/IceStorm/Grammar.y +++ b/cpp/src/IceStorm/Grammar.y @@ -31,6 +31,7 @@ #if defined(__clang__) # pragma clang diagnostic ignored "-Wconversion" # pragma clang diagnostic ignored "-Wsign-conversion" +# pragma clang diagnostic ignored "-Wunused-but-set-variable" #endif using namespace std; diff --git a/cpp/src/IceUtil/StringConverter.cpp b/cpp/src/IceUtil/StringConverter.cpp index 4dd0da44c47..2af835db0c8 100644 --- a/cpp/src/IceUtil/StringConverter.cpp +++ b/cpp/src/IceUtil/StringConverter.cpp @@ -2,10 +2,12 @@ // Copyright (c) ZeroC, Inc. All rights reserved. // +// TODO codecvt was deprecated in C++17 and cause build failures in C++17 mode +// For VC++ we should replace this code with MultiByteToWideChar() and WideCharToMultiByte() #if defined(_MSC_VER) && (_MSVC_LANG >= 201703L) - // TODO codecvt was deprecated in C++17 and cause build failures with VC++ compiler - // we should replace this code with MultiByteToWideChar() and WideCharToMultiByte() # define _SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING +#elif (__cplusplus >= 201703L) +# include <IceUtil/DisableWarnings.h> #endif #include <IceUtil/StringConverter.h> diff --git a/cpp/src/Slice/Grammar.cpp b/cpp/src/Slice/Grammar.cpp index 3cb7c833df6..5a34b9445a5 100644 --- a/cpp/src/Slice/Grammar.cpp +++ b/cpp/src/Slice/Grammar.cpp @@ -104,6 +104,7 @@ #if defined(__clang__) # pragma clang diagnostic ignored "-Wconversion" # pragma clang diagnostic ignored "-Wsign-conversion" +# pragma clang diagnostic ignored "-Wunused-but-set-variable" #endif using namespace std; diff --git a/cpp/src/Slice/Grammar.y b/cpp/src/Slice/Grammar.y index 837ab577bc8..3c8b3d9f0f3 100644 --- a/cpp/src/Slice/Grammar.y +++ b/cpp/src/Slice/Grammar.y @@ -31,6 +31,7 @@ #if defined(__clang__) # pragma clang diagnostic ignored "-Wconversion" # pragma clang diagnostic ignored "-Wsign-conversion" +# pragma clang diagnostic ignored "-Wunused-but-set-variable" #endif using namespace std; diff --git a/cpp/src/slice2cs/CsUtil.cpp b/cpp/src/slice2cs/CsUtil.cpp index c413b5ae381..ba8eb68c61c 100644 --- a/cpp/src/slice2cs/CsUtil.cpp +++ b/cpp/src/slice2cs/CsUtil.cpp @@ -2433,14 +2433,11 @@ Slice::CsGenerator::writeSerializeDeserializeCode(Output &out, string Slice::CsGenerator::toArrayAlloc(const string& decl, const string& sz) { - int count = 0; string::size_type pos = decl.size(); while(pos > 1 && decl.substr(pos - 2, 2) == "[]") { - ++count; pos -= 2; } - assert(count > 0); ostringstream o; o << decl.substr(0, pos) << '[' << sz << ']' << decl.substr(pos + 2); diff --git a/cpp/src/slice2java/Gen.cpp b/cpp/src/slice2java/Gen.cpp index 011f11e0e4b..dbd2ddfd280 100644 --- a/cpp/src/slice2java/Gen.cpp +++ b/cpp/src/slice2java/Gen.cpp @@ -4328,7 +4328,6 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p) // // Determine sequence depth. // - int depth = 0; TypePtr origContent = p->type(); SequencePtr s = SequencePtr::dynamicCast(origContent); while(s) @@ -4340,7 +4339,6 @@ Slice::Gen::HelperVisitor::visitSequence(const SequencePtr& p) { break; } - depth++; origContent = s->type(); s = SequencePtr::dynamicCast(origContent); } diff --git a/cpp/src/slice2java/GenCompat.cpp b/cpp/src/slice2java/GenCompat.cpp index 5d2985afce5..b3f5504f741 100644 --- a/cpp/src/slice2java/GenCompat.cpp +++ b/cpp/src/slice2java/GenCompat.cpp @@ -5028,7 +5028,6 @@ Slice::GenCompat::HelperVisitor::visitSequence(const SequencePtr& p) // // Determine sequence depth. // - int depth = 0; TypePtr origContent = p->type(); SequencePtr s = SequencePtr::dynamicCast(origContent); while(s) @@ -5040,7 +5039,6 @@ Slice::GenCompat::HelperVisitor::visitSequence(const SequencePtr& p) { break; } - depth++; origContent = s->type(); s = SequencePtr::dynamicCast(origContent); } |