summaryrefslogtreecommitdiff
path: root/cpp/include
diff options
context:
space:
mode:
authorBernard Normier <bernard@zeroc.com>2018-10-26 17:17:11 -0400
committerBernard Normier <bernard@zeroc.com>2018-10-26 17:17:11 -0400
commit42c905a3ca29a1e911e7def9c2d9d9b8e95383cd (patch)
tree1b704d084e39c0acd15859f2dd258eff7aaa7fc6 /cpp/include
parentDo not use time.clock() with Python >= 3.3 as it is deprecated (diff)
downloadice-42c905a3ca29a1e911e7def9c2d9d9b8e95383cd.tar.bz2
ice-42c905a3ca29a1e911e7def9c2d9d9b8e95383cd.tar.xz
ice-42c905a3ca29a1e911e7def9c2d9d9b8e95383cd.zip
Extra C++ warning flags with clang and g++.
Fixes 223.
Diffstat (limited to 'cpp/include')
-rw-r--r--cpp/include/Ice/MetricsAdminI.h9
-rw-r--r--cpp/include/Ice/Proxy.h2
-rw-r--r--cpp/include/IceUtil/Config.h6
-rw-r--r--cpp/include/IceUtil/PushDisableWarnings.h1
4 files changed, 15 insertions, 3 deletions
diff --git a/cpp/include/Ice/MetricsAdminI.h b/cpp/include/Ice/MetricsAdminI.h
index 46beb043200..cad066d3670 100644
--- a/cpp/include/Ice/MetricsAdminI.h
+++ b/cpp/include/Ice/MetricsAdminI.h
@@ -325,7 +325,14 @@ public:
}
}
- MetricsMapT(const MetricsMapT& other) : MetricsMapI(other), _destroyed(false)
+ MetricsMapT(const MetricsMapT& other)
+ :
+#ifndef ICE_CPP11_MAPPING
+ IceUtil::Shared(),
+#endif
+ MetricsMapI(other),
+ IceUtil::Mutex(),
+ _destroyed(false)
{
}
diff --git a/cpp/include/Ice/Proxy.h b/cpp/include/Ice/Proxy.h
index dc1c073c04b..cea157c6863 100644
--- a/cpp/include/Ice/Proxy.h
+++ b/cpp/include/Ice/Proxy.h
@@ -1620,8 +1620,6 @@ checkedCast(const ::std::shared_ptr<T>& b, const std::string& f, const ::Ice::Co
return r;
}
-ICE_API ::std::ostream& operator<<(::std::ostream&, const Ice::ObjectPrx&);
-
}
#else // C++98 mapping
diff --git a/cpp/include/IceUtil/Config.h b/cpp/include/IceUtil/Config.h
index be1ab674324..4f40c912047 100644
--- a/cpp/include/IceUtil/Config.h
+++ b/cpp/include/IceUtil/Config.h
@@ -227,6 +227,12 @@
# define ICE_DEPRECATED_API(msg) /**/
#endif
+#if defined(__clang__) || defined(__GNUC__)
+# define ICE_MAYBE_UNUSED __attribute__((unused))
+#else
+# define ICE_MAYBE_UNUSED /**/
+#endif
+
#ifdef _WIN32
# include <windows.h>
diff --git a/cpp/include/IceUtil/PushDisableWarnings.h b/cpp/include/IceUtil/PushDisableWarnings.h
index 9bc7c0fb863..c66654e5144 100644
--- a/cpp/include/IceUtil/PushDisableWarnings.h
+++ b/cpp/include/IceUtil/PushDisableWarnings.h
@@ -24,6 +24,7 @@
# 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
#elif defined(__GNUC__)
# pragma GCC diagnostic push