NO-JIRA: Fix compile error on gcc Tested on (g++, clang++) * (c++11, c++03) and "Visual Studo 9 2008"
Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/fa784b1f Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/fa784b1f Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/fa784b1f Branch: refs/heads/proton-go Commit: fa784b1f3c4f3dbd6b143d5cceda10bf76da23a5 Parents: c7822d6 Author: Alan Conway <[email protected]> Authored: Mon Sep 21 10:50:00 2015 -0400 Committer: Alan Conway <[email protected]> Committed: Mon Sep 21 11:21:41 2015 -0400 ---------------------------------------------------------------------- proton-c/CMakeLists.txt | 6 ++++++ proton-c/bindings/cpp/include/proton/message.hpp | 2 -- proton-c/bindings/cpp/src/contexts.hpp | 2 +- proton-c/bindings/cpp/src/conversion_test.cpp | 6 ------ 4 files changed, 7 insertions(+), 9 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/fa784b1f/proton-c/CMakeLists.txt ---------------------------------------------------------------------- diff --git a/proton-c/CMakeLists.txt b/proton-c/CMakeLists.txt index d550faa..738aba8 100644 --- a/proton-c/CMakeLists.txt +++ b/proton-c/CMakeLists.txt @@ -242,6 +242,12 @@ if (CMAKE_COMPILER_IS_GNUCC) endif (ENABLE_UNDEFINED_ERROR) endif (CMAKE_COMPILER_IS_GNUCC) +if (CMAKE_CXX_COMPILER_ID MATCHES "Clang") + if (ENABLE_WARNING_ERROR) + set (WERROR "-Werror") + endif (ENABLE_WARNING_ERROR) +endif() + if (MSVC) set(CMAKE_DEBUG_POSTFIX "d") add_definitions( http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/fa784b1f/proton-c/bindings/cpp/include/proton/message.hpp ---------------------------------------------------------------------- diff --git a/proton-c/bindings/cpp/include/proton/message.hpp b/proton-c/bindings/cpp/include/proton/message.hpp index 44d75c0..92086d1 100644 --- a/proton-c/bindings/cpp/include/proton/message.hpp +++ b/proton-c/bindings/cpp/include/proton/message.hpp @@ -129,8 +129,6 @@ class message /// Decode the message from link corresponding to delivery. PN_CPP_EXTERN void decode(proton::link&, proton::delivery&); - PN_CPP_EXTERN void operator delete(void*); - private: pn_message_t *message_; }; http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/fa784b1f/proton-c/bindings/cpp/src/contexts.hpp ---------------------------------------------------------------------- diff --git a/proton-c/bindings/cpp/src/contexts.hpp b/proton-c/bindings/cpp/src/contexts.hpp index 028b123..1df947e 100644 --- a/proton-c/bindings/cpp/src/contexts.hpp +++ b/proton-c/bindings/cpp/src/contexts.hpp @@ -46,7 +46,7 @@ struct connection_context : public counted { pn_unique_ptr<class handler> handler; session* default_session; // Owned by connection - container_impl* container_impl; + class container_impl* container_impl; message event_message; // re-used by messaging_adapter for performance }; http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/fa784b1f/proton-c/bindings/cpp/src/conversion_test.cpp ---------------------------------------------------------------------- diff --git a/proton-c/bindings/cpp/src/conversion_test.cpp b/proton-c/bindings/cpp/src/conversion_test.cpp index d056247..53ce879 100644 --- a/proton-c/bindings/cpp/src/conversion_test.cpp +++ b/proton-c/bindings/cpp/src/conversion_test.cpp @@ -45,12 +45,6 @@ void test_counted() { session_ptr p2 = s.ptr(); } -void test_auto() { - std::auto_ptr<connection> conn(connection::cast(pn_connection())); - session& s = conn->default_session(); - std::auto_ptr<session> p(s.ptr().release()); -} - int main(int argc, char** argv) { int failed = 0; failed += run_test(&test_counted<counted_ptr<connection>, --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
