diff --git a/CMakeLists.txt b/CMakeLists.txt index e3f7b2bca5d6be5020bfbef5a3938d2ecb1c5e0b..b99f97ca88c411dc1cdb3ab094163581fabdaba5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required (VERSION 2.6) project(cta) set(CMAKE_C_FLAGS "-fPIC -pedantic -Wall -Wextra -Werror -Wno-unused-parameter") -set(CMAKE_CXX_FLAGS "-fPIC -pedantic -Wall -Wextra -Werror -Wno-unused-parameter") +set(CMAKE_CXX_FLAGS "-fPIC -pedantic -Wall -Wextra -Werror -Wno-unused-parameter -Wno-long-long") # Explicitly setting the C and C++ compiler flags for the RelWithDebInfo build # in order to prevent the -O2 flag from being used. diff --git a/objectstore/Action.hpp b/objectstore/Action.hpp index 4e019d540e849e59e1761c0e02d7aa2040c0257c..d94266cbd62e6a5b3f4779c2b7690dedcc1feb2c 100644 --- a/objectstore/Action.hpp +++ b/objectstore/Action.hpp @@ -183,6 +183,8 @@ private: { break; } + default: + break; } } } catch (...) {} diff --git a/objectstore/Agent.cpp b/objectstore/Agent.cpp index 6b2d90695fd8be6f824b697f135ae1118e1f0df1..b922f502545cf34c08c18481815aa5a37b562369 100644 --- a/objectstore/Agent.cpp +++ b/objectstore/Agent.cpp @@ -8,11 +8,11 @@ cta::objectstore::Agent::Agent(ObjectStore & os): ObjectOps<serializers::Agent>(os), - m_nextId(0), m_setupDone(false), m_creationDone(false), m_observerVersion(false) {}; + m_setupDone(false), m_creationDone(false), m_observerVersion(false), m_nextId(0) {} cta::objectstore::Agent::Agent(ObjectStore & os, const std::string & typeName): ObjectOps<serializers::Agent>(os), - m_nextId(0), m_setupDone(false), m_creationDone(false), m_observerVersion(false) { + m_setupDone(false), m_creationDone(false), m_observerVersion(false), m_nextId(0) { setup(typeName); } diff --git a/objectstore/FIFO.hpp b/objectstore/FIFO.hpp index 8a3d48035e35a579eaaac4e7f2e8231d923fc17f..f164f94e7c9003b9a6186c499f55c8a29e417f63 100644 --- a/objectstore/FIFO.hpp +++ b/objectstore/FIFO.hpp @@ -43,7 +43,7 @@ public: std::string peek() { if (m_writeDone) throw cta::exception::Exception("In FIFO::Transaction::peek: write already occurred"); - if (m_fifo.m_currentState.readpointer() >= m_fifo.m_currentState.name_size()) + if (m_fifo.m_currentState.readpointer() >= (uint64_t)m_fifo.m_currentState.name_size()) throw FIFOEmpty("In FIFO::Transaction::peek: FIFO empty"); return m_fifo.m_currentState.name(m_fifo.m_currentState.readpointer()); } @@ -51,7 +51,7 @@ public: void popAndUnlock() { if (m_writeDone) throw cta::exception::Exception("In FIFO::Transaction::popAndUnlock: write already occurred"); - if (m_fifo.m_currentState.readpointer() >= m_fifo.m_currentState.name_size()) + if (m_fifo.m_currentState.readpointer() >= (uint64_t)m_fifo.m_currentState.name_size()) throw FIFOEmpty("In FIFO::Transaction::popAndUnlock: FIFO empty"); m_fifo.m_currentState.set_readpointer(m_fifo.m_currentState.readpointer()+1); if (m_fifo.m_currentState.readpointer() > 100) { diff --git a/objectstore/RecallJob.hpp b/objectstore/RecallJob.hpp index bca006c2885914e5c13dad4419fbabb40fa8da8f..a79c55da8346bbe27a44c0e2f1f284c83df7b283 100644 --- a/objectstore/RecallJob.hpp +++ b/objectstore/RecallJob.hpp @@ -16,6 +16,7 @@ public: std::string ret = agent.nextId("RecallJob"); agent.addToIntend(container, ret, serializers::RecallJob_t); agent.objectStore().atomicOverwrite(ret, rjs.SerializeAsString()); + return ret; } RecallJob(const std::string & name, Agent & agent): diff --git a/objectstore/exception/Errnum.cpp b/objectstore/exception/Errnum.cpp index 6a61ed65417e901653f20a553bd3a21c3fffbabd..4f88157e9bf402b2cfdae0b31682b6c1f6725465 100644 --- a/objectstore/exception/Errnum.cpp +++ b/objectstore/exception/Errnum.cpp @@ -42,7 +42,7 @@ Errnum::Errnum(int err, std::string what):Exception("") { void Errnum::ErrnumConstructorBottomHalf(const std::string & what) { char buf[100]; - if(int ret = strerror_r_wrapper(m_errnum, buf, sizeof(buf))) { + if(strerror_r_wrapper(m_errnum, buf, sizeof(buf))) { // sstrerror_r() failed const int new_errno = errno; std::stringstream w;