diff --git a/Control/AthenaKernel/AthenaKernel/DataBucket.icc b/Control/AthenaKernel/AthenaKernel/DataBucket.icc index 4307977ccc34fe9db9c07278ce6e2fd24a972c99..577f3d310e83083afb9d2fea79814328e55fe7a0 100755 --- a/Control/AthenaKernel/AthenaKernel/DataBucket.icc +++ b/Control/AthenaKernel/AthenaKernel/DataBucket.icc @@ -1,7 +1,7 @@ ///////////////////////// -*- C++ -*- ///////////////////////////// /* - Copyright (C) 2002-2018 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #include "AthenaKernel/IRegisterTransient.h" @@ -65,6 +65,7 @@ SG::DataBucket<T>::DataBucket(T* data) template <typename T> template <typename U> +// cppcheck-suppress uninitMemberVar ; false positive SG::DataBucket<T>::DataBucket(std::unique_ptr<U> data) // Rely on our caller to retain constness. : DataBucket (const_cast<typename std::remove_const<U>::type*> (data.release())) diff --git a/Control/AthenaKernel/AthenaKernel/POSIXTimeKeeper.h b/Control/AthenaKernel/AthenaKernel/POSIXTimeKeeper.h index 8b14004dd72ab0357ae34b5730a20ab7367a9b88..549e3b74ef9af071c1c83b854120a50382f5f867 100644 --- a/Control/AthenaKernel/AthenaKernel/POSIXTimeKeeper.h +++ b/Control/AthenaKernel/AthenaKernel/POSIXTimeKeeper.h @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ #ifndef ATHENAKERNEL_POSIXTIMEKEEPER_H @@ -34,7 +34,8 @@ public: /// TimeKeeper Implementation //@{ virtual time_t allocTime() const = 0; ///< allocated CPU time for job - virtual void updateTime(); + // cppcheck-suppress virtualCallInConstructor + virtual void updateTime(); virtual const std::string& unitLabel() const; //@} diff --git a/Control/AthenaKernel/src/errorcheck.cxx b/Control/AthenaKernel/src/errorcheck.cxx index e3167bbdcb0e07ebce2fee5c4dfa667fd39ef55a..82c9957764f5441b5308e11c7109e5eabc8ba255 100644 --- a/Control/AthenaKernel/src/errorcheck.cxx +++ b/Control/AthenaKernel/src/errorcheck.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id: errorcheck.cxx,v 1.5 2009-04-09 15:11:17 ssnyder Exp $ @@ -104,8 +104,8 @@ std::string munge_punct (const std::string& str_in) std::string do_replace (std::string s, - const std::string pat, - const std::string rep) + const std::string& pat, + const std::string& rep) { std::string::size_type ipos = 0; while ((ipos = s.find (pat, ipos)) != std::string::npos) @@ -124,7 +124,7 @@ std::string munge_names (const std::string& str_in) s = do_replace (s, "void* ", "void*"); s = do_replace (s, "CLID", "unsigned int"); - if (s.find ("virtual ") == 0) + if (s.compare (0, 8, "virtual ") == 0) s.erase (0, 8); return s; } diff --git a/Control/AthenaKernel/test/RCUObject_test.cxx b/Control/AthenaKernel/test/RCUObject_test.cxx index 1d5213225a2cca53c1b7fc39327028e70b0619c8..9ff45f259d678094ca2039686f02267d93dc9c3c 100644 --- a/Control/AthenaKernel/test/RCUObject_test.cxx +++ b/Control/AthenaKernel/test/RCUObject_test.cxx @@ -1,5 +1,5 @@ /* - Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration + Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration */ // $Id$ @@ -128,6 +128,8 @@ void test1() optr = &rcuo; assert (svc.m_removed == nullptr); } + // cppcheck-suppress invalidLifetime + // cppcheck-suppress deadpointer assert (svc.m_removed == optr); } Payload::getlog();