diff options
author | Bernard Normier <bernard@zeroc.com> | 2018-11-01 17:14:06 -0400 |
---|---|---|
committer | Bernard Normier <bernard@zeroc.com> | 2018-11-01 17:14:06 -0400 |
commit | 3a763985c52246b1b804cdd7ee7bd49a82e76bd3 (patch) | |
tree | e35b1b0bdf6715ed784d0c86482355528bee81ee /cpp/src/slice2objc | |
parent | Visual Studio and msbuild updates (diff) | |
download | ice-3a763985c52246b1b804cdd7ee7bd49a82e76bd3.tar.bz2 ice-3a763985c52246b1b804cdd7ee7bd49a82e76bd3.tar.xz ice-3a763985c52246b1b804cdd7ee7bd49a82e76bd3.zip |
Increase Visual Studio warning level to Level4
Fixes #223.
Diffstat (limited to 'cpp/src/slice2objc')
-rw-r--r-- | cpp/src/slice2objc/Gen.cpp | 8 | ||||
-rw-r--r-- | cpp/src/slice2objc/ObjCUtil.cpp | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/cpp/src/slice2objc/Gen.cpp b/cpp/src/slice2objc/Gen.cpp index d753073e370..27bb357cd75 100644 --- a/cpp/src/slice2objc/Gen.cpp +++ b/cpp/src/slice2objc/Gen.cpp @@ -29,7 +29,11 @@ using namespace Slice; using namespace IceUtilInternal; // TODO: fix this warning! -#if defined(__clang__) +#if defined(_MSC_VER) +# pragma warning(disable:4456) // shadow +# pragma warning(disable:4457) // shadow +# pragma warning(disable:4459) // shadow +#elif defined(__clang__) # pragma clang diagnostic ignored "-Wshadow" #elif defined(__GNUC__) # pragma GCC diagnostic ignored "-Wshadow" @@ -2024,7 +2028,7 @@ Slice::Gen::TypesVisitor::writeOptionalDataMemberSelectors(const DataMemberList& string paramName = getParamName(*q, true); string capName = (*q)->name(); - capName[0] = toupper(static_cast<unsigned char>(capName[0])); + capName[0] = static_cast<char>(toupper(static_cast<unsigned char>(capName[0]))); _H << nl << "-(void)set" << capName << ":(" << typeString << ")" << name << ";"; diff --git a/cpp/src/slice2objc/ObjCUtil.cpp b/cpp/src/slice2objc/ObjCUtil.cpp index 47bfb1d37b3..1cbe7314c3b 100644 --- a/cpp/src/slice2objc/ObjCUtil.cpp +++ b/cpp/src/slice2objc/ObjCUtil.cpp @@ -241,7 +241,7 @@ Slice::ObjCGenerator::getFactoryMethod(const ContainedPtr& p, bool deprecated) } else if(deprecated || name.size() < 2 || !isupper(*(name.begin() + 1))) { - *name.begin() = tolower(*name.begin()); + *name.begin() = static_cast<char>(tolower(*name.begin())); } else { @@ -251,7 +251,7 @@ Slice::ObjCGenerator::getFactoryMethod(const ContainedPtr& p, bool deprecated) { break; } - *q = tolower(*q); + *q = static_cast<char>(tolower(*q)); } } return name; |