From f196d414bd626c898a1a656fd18954f1f64846bb Mon Sep 17 00:00:00 2001
From: scott snyder <sss@karma>
Date: Thu, 18 Jun 2020 17:44:36 +0200
Subject: [PATCH] AthContainers: Fix cppcheck warnings.

Suppress some warnings new with cppcheck 2.0.
---
 Control/AthContainers/AthContainers/tools/ElementProxy.icc | 6 +++---
 Control/AthContainers/test/supportsThinning_test.cxx       | 3 ++-
 2 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/Control/AthContainers/AthContainers/tools/ElementProxy.icc b/Control/AthContainers/AthContainers/tools/ElementProxy.icc
index c394f225130..c7322bdea63 100644
--- a/Control/AthContainers/AthContainers/tools/ElementProxy.icc
+++ b/Control/AthContainers/AthContainers/tools/ElementProxy.icc
@@ -1,8 +1,6 @@
 /*
-  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
-
-// $Id$
 /**
  * @file AthContainers/tools/ElementProxy.icc
  * @author scott snyder <snyder@bnl.gov>
@@ -46,9 +44,11 @@ ElementProxy<DVL>::ElementProxy (typename DVL::BaseContainer::iterator i,
  * @c DataVector/List's, both of which own their elements.
  */
 template <class DVL>
+// cppcheck-suppress operatorEqVarError
 ElementProxy<DVL>& ElementProxy<DVL>::operator= (const ElementProxy& rhs)
 {
   if (*rhs.m_proxied != *m_proxied) {
+    // cppcheck-suppress assertWithSideEffect
     ATHCONTAINERS_ASSERT (! (container()->ownPolicy() == SG::OWN_ELEMENTS &&
                              rhs.container()->ownPolicy() == SG::OWN_ELEMENTS));
     container()->assignBaseElement (m_proxied, *rhs.m_proxied);
diff --git a/Control/AthContainers/test/supportsThinning_test.cxx b/Control/AthContainers/test/supportsThinning_test.cxx
index 858a5b2acd3..1b39f0115eb 100644
--- a/Control/AthContainers/test/supportsThinning_test.cxx
+++ b/Control/AthContainers/test/supportsThinning_test.cxx
@@ -1,5 +1,5 @@
 /*
-  Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
+  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
 */
 /**
  * @file AthContainers/test/supportsThinning_test.cxx
@@ -21,6 +21,7 @@ struct A {};
 struct B : public DataVector<int> {};
 struct B0 : public DataVector<int> { static bool constexpr supportsThinning = false; };
 struct C : public SG::AuxElement {};
+// cppcheck-suppress duplInheritedMember
 struct C0 : public SG::AuxElement { static bool constexpr supportsThinning = false; };
 struct D : public SG::AuxStoreInternal {};
 struct D0 : public SG::AuxStoreInternal { static bool constexpr supportsThinning = false; };
-- 
GitLab