diff options
author | Bernard Normier <bernard@zeroc.com> | 2019-10-29 13:54:17 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2019-10-29 13:54:17 -0400 |
commit | 79c5c93cc596c8cf3dffa88627835a320e333efa (patch) | |
tree | c930f73542a2abe0644c13302179957e4e4859fb /cpp/src | |
parent | Workaround for sporadic carthage segfault (diff) | |
download | ice-79c5c93cc596c8cf3dffa88627835a320e333efa.tar.bz2 ice-79c5c93cc596c8cf3dffa88627835a320e333efa.tar.xz ice-79c5c93cc596c8cf3dffa88627835a320e333efa.zip |
Fix clang -std=c++17 build
Note: still building Ice C++11 with -std=c++11.
Diffstat (limited to 'cpp/src')
-rw-r--r-- | cpp/src/Ice/ArgVector.cpp | 2 | ||||
-rw-r--r-- | cpp/src/Ice/InputStream.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/Ice/ArgVector.cpp b/cpp/src/Ice/ArgVector.cpp index 48ce959524f..2a057f9a312 100644 --- a/cpp/src/Ice/ArgVector.cpp +++ b/cpp/src/Ice/ArgVector.cpp @@ -47,7 +47,7 @@ void IceInternal::ArgVector::setupArgcArgv() { argc = static_cast<int>(_args.size()); - if((argv = new char*[argc + 1]) == 0) + if((argv = new char*[static_cast<size_t>(argc + 1)]) == 0) { throw ::std::bad_alloc(); } diff --git a/cpp/src/Ice/InputStream.cpp b/cpp/src/Ice/InputStream.cpp index 9f85122928d..d0c4c91d9fc 100644 --- a/cpp/src/Ice/InputStream.cpp +++ b/cpp/src/Ice/InputStream.cpp @@ -481,7 +481,7 @@ struct ReadBoolHelper { static bool* read(pair<const bool*, const bool*>& v, Int sz, InputStream::Container::iterator& i) { - bool* array = new bool[sz]; + bool* array = new bool[static_cast<size_t>(sz)]; for(int idx = 0; idx < sz; ++idx) { array[idx] = static_cast<bool>(*(i + idx)); |