summaryrefslogtreecommitdiff
path: root/cpp
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2018-10-27 17:57:25 -0400
committerBernard Normier <bernard@zeroc.com>2018-10-27 17:57:25 -0400
commit1c72f5304e91f2e55b117bfd1f8ddb357c96bf19 (patch)
tree5b7d90885593f0e4e0b94b1cb90840805ae2ddb5 /cpp
parentFixed iOS and PHP7 shadow warning related build failures (diff)
downloadice-1c72f5304e91f2e55b117bfd1f8ddb357c96bf19.tar.bz2
ice-1c72f5304e91f2e55b117bfd1f8ddb357c96bf19.tar.xz
ice-1c72f5304e91f2e55b117bfd1f8ddb357c96bf19.zip
Fixed fallthrough warnings + clang 3.x fixes
Diffstat (limited to 'cpp')
-rw-r--r--cpp/include/IceUtil/PushDisableWarnings.h7
-rw-r--r--cpp/src/Ice/OutgoingAsync.cpp2
-rw-r--r--cpp/src/IceStorm/Subscriber.cpp2
-rw-r--r--cpp/src/slice2confluence/ConfluenceOutput.cpp2
-rw-r--r--cpp/src/slice2confluence/Gen.cpp2
-rw-r--r--cpp/src/slice2confluence/Gen.h3
-rw-r--r--cpp/src/slice2html/Gen.cpp2
-rw-r--r--cpp/src/slice2html/Gen.h3
-rw-r--r--cpp/src/slice2js/Gen.cpp2
-rw-r--r--cpp/src/slice2objc/ObjCUtil.cpp1
10 files changed, 17 insertions, 9 deletions
diff --git a/cpp/include/IceUtil/PushDisableWarnings.h b/cpp/include/IceUtil/PushDisableWarnings.h
index c66654e5144..282bffad45c 100644
--- a/cpp/include/IceUtil/PushDisableWarnings.h
+++ b/cpp/include/IceUtil/PushDisableWarnings.h
@@ -24,7 +24,12 @@
# pragma clang diagnostic push
# pragma clang diagnostic ignored "-Wredundant-decls" // expected when using forward Slice declarations
# pragma clang diagnostic ignored "-Wdocumentation-deprecated-sync" // see zeroc-ice/ice issue #211
-# pragma clang diagnostic ignored "-Wshadow-field-in-constructor" // expected in some generated header files
+
+# if (__clang_major__ >= 4)
+# pragma clang diagnostic ignored "-Wshadow-field-in-constructor" // expected in some generated header files
+# else
+# pragma clang diagnostic ignored "-Wshadow-all" // expected in some generated header files
+# endif
#elif defined(__GNUC__)
# pragma GCC diagnostic push
diff --git a/cpp/src/Ice/OutgoingAsync.cpp b/cpp/src/Ice/OutgoingAsync.cpp
index 5883ec11a5a..f3e35523fdf 100644
--- a/cpp/src/Ice/OutgoingAsync.cpp
+++ b/cpp/src/Ice/OutgoingAsync.cpp
@@ -1036,6 +1036,7 @@ OutgoingAsync::response()
ex->facet = facet;
ex->operation = operation;
ex->ice_throw();
+ break;
}
case replyUnknownException:
@@ -1075,6 +1076,7 @@ OutgoingAsync::response()
ex->unknown = unknown;
ex->ice_throw();
+ break;
}
default:
diff --git a/cpp/src/IceStorm/Subscriber.cpp b/cpp/src/IceStorm/Subscriber.cpp
index db96057e670..0c34ddea84b 100644
--- a/cpp/src/IceStorm/Subscriber.cpp
+++ b/cpp/src/IceStorm/Subscriber.cpp
@@ -685,8 +685,8 @@ Subscriber::queue(bool forwarded, const EventDataSeq& events)
// State transition to online.
//
setState(SubscriberStateOnline);
- // fall through
}
+ /* FALLTHROUGH */
case SubscriberStateOnline:
{
diff --git a/cpp/src/slice2confluence/ConfluenceOutput.cpp b/cpp/src/slice2confluence/ConfluenceOutput.cpp
index ecee4fa5419..900fcb164a8 100644
--- a/cpp/src/slice2confluence/ConfluenceOutput.cpp
+++ b/cpp/src/slice2confluence/ConfluenceOutput.cpp
@@ -15,7 +15,7 @@
#if defined(__clang__)
# pragma clang diagnostic ignored "-Wshadow"
-# pragma clang diagnostic ignored "-Wshadow-field"
+# pragma clang diagnostic ignored "-Wshadow-all"
# pragma clang diagnostic ignored "-Wunused-parameter"
#elif defined(__GNUC__)
# pragma GCC diagnostic ignored "-Wshadow"
diff --git a/cpp/src/slice2confluence/Gen.cpp b/cpp/src/slice2confluence/Gen.cpp
index 3eff17700c0..0bf944121b9 100644
--- a/cpp/src/slice2confluence/Gen.cpp
+++ b/cpp/src/slice2confluence/Gen.cpp
@@ -29,7 +29,7 @@
#if defined(__clang__)
# pragma clang diagnostic ignored "-Wshadow"
-# pragma clang diagnostic ignored "-Wshadow-field"
+# pragma clang diagnostic ignored "-Wshadow-all"
# pragma clang diagnostic ignored "-Wunused-parameter"
#elif defined(__GNUC__)
# pragma GCC diagnostic ignored "-Wshadow"
diff --git a/cpp/src/slice2confluence/Gen.h b/cpp/src/slice2confluence/Gen.h
index abc59399e06..73dbc746bdd 100644
--- a/cpp/src/slice2confluence/Gen.h
+++ b/cpp/src/slice2confluence/Gen.h
@@ -17,8 +17,7 @@
#include <iterator>
#if defined(__clang__)
-// TODO: fix these warnings!
-# pragma clang diagnostic ignored "-Wshadow-field"
+# pragma clang diagnostic ignored "-Wshadow-all"
#endif
namespace Slice
diff --git a/cpp/src/slice2html/Gen.cpp b/cpp/src/slice2html/Gen.cpp
index 6e1440dd9c5..21eeb7553f6 100644
--- a/cpp/src/slice2html/Gen.cpp
+++ b/cpp/src/slice2html/Gen.cpp
@@ -27,7 +27,7 @@
#if defined(__clang__)
# pragma clang diagnostic ignored "-Wshadow"
-# pragma clang diagnostic ignored "-Wshadow-field"
+# pragma clang diagnostic ignored "-Wshadow-all"
# pragma clang diagnostic ignored "-Wunused-parameter"
#elif defined(__GNUC__)
# pragma GCC diagnostic ignored "-Wshadow"
diff --git a/cpp/src/slice2html/Gen.h b/cpp/src/slice2html/Gen.h
index 7cc3faa3dd1..ee6abdf57ce 100644
--- a/cpp/src/slice2html/Gen.h
+++ b/cpp/src/slice2html/Gen.h
@@ -14,8 +14,7 @@
#include <IceUtil/OutputUtil.h>
#if defined(__clang__)
-// TODO: fix these warnings!
-# pragma clang diagnostic ignored "-Wshadow-field"
+# pragma clang diagnostic ignored "-Wshadow-all"
#endif
namespace Slice
diff --git a/cpp/src/slice2js/Gen.cpp b/cpp/src/slice2js/Gen.cpp
index 40228a48769..7b050e80a12 100644
--- a/cpp/src/slice2js/Gen.cpp
+++ b/cpp/src/slice2js/Gen.cpp
@@ -879,8 +879,10 @@ Slice::Gen::RequireVisitor::visitDictionary(const DictionaryPtr& dict)
{
case Builtin::KindObject:
_seenObjectDict = true;
+ break;
case Builtin::KindObjectProxy:
_seenObjectProxyDict = true;
+ break;
default:
break;
}
diff --git a/cpp/src/slice2objc/ObjCUtil.cpp b/cpp/src/slice2objc/ObjCUtil.cpp
index b1e49e69464..47bfb1d37b3 100644
--- a/cpp/src/slice2objc/ObjCUtil.cpp
+++ b/cpp/src/slice2objc/ObjCUtil.cpp
@@ -76,6 +76,7 @@ lookupKwd(const string& name, int baseType, bool mangleCasts = false)
{
break;
}
+ /* FALLTHROUGH */
case BaseTypeObject:
found = binary_search(&nsObjectList[0],