From 6dd1071e4b834c20a2807004b2deda3fe167f7ed Mon Sep 17 00:00:00 2001 From: Scott Snyder <scott.snyder@cern.ch> Date: Sat, 1 Oct 2022 19:30:17 +0200 Subject: [PATCH] AFP_EventTPCnv: Fix thread-safety checker warnings. AFP_EventTPCnv: Fix thread-safety checker warnings. Fix (disabled-by-default) warnings about calling unchecked code. --- .../AFP/AFP_EventCnv/AFP_EventTPCnv/CMakeLists.txt | 4 ++-- .../test/AFP_SIDLocRecoEvCollectionCnv_p1_test.cxx | 5 +++-- .../AFP_EventTPCnv/test/AFP_SIDLocRecoEventCnv_p1_test.cxx | 5 +++-- .../AFP_EventTPCnv/test/AFP_SIDSimHitCnv_p1_test.cxx | 5 +++-- .../AFP_EventTPCnv/test/AFP_SiDigiCnv_p1_test.cxx | 5 +++-- .../AFP_EventTPCnv/test/AFP_TDDigiCnv_p1_test.cxx | 5 +++-- .../test/AFP_TDLocRecoEvCollectionCnv_p1_test.cxx | 5 +++-- .../AFP_EventTPCnv/test/AFP_TDLocRecoEventCnv_p1_test.cxx | 5 +++-- .../AFP_EventTPCnv/test/AFP_TDSimHitCnv_p1_test.cxx | 5 +++-- 9 files changed, 26 insertions(+), 18 deletions(-) diff --git a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/CMakeLists.txt b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/CMakeLists.txt index 6d01c19eedc0..1480949145eb 100644 --- a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/CMakeLists.txt +++ b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/CMakeLists.txt @@ -1,4 +1,4 @@ -# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration +# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration # Declare the package name. atlas_subdir( AFP_EventTPCnv ) @@ -24,7 +24,7 @@ foreach( test AFP_SiDigiCnv_p1_test atlas_add_test( ${test} SOURCES test/${test}.cxx - LINK_LIBRARIES GaudiKernel TestTools AFP_EventTPCnv ) + LINK_LIBRARIES GaudiKernel TestTools AFP_EventTPCnv CxxUtils ) endforeach() diff --git a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_SIDLocRecoEvCollectionCnv_p1_test.cxx b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_SIDLocRecoEvCollectionCnv_p1_test.cxx index 7c37c2c5c777..ef125a481ad3 100644 --- a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_SIDLocRecoEvCollectionCnv_p1_test.cxx +++ b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_SIDLocRecoEvCollectionCnv_p1_test.cxx @@ -11,6 +11,7 @@ #undef NDEBUG #include "AFP_EventTPCnv/AFP_SIDLocRecoEvCollectionCnv_p1.h" +#include "CxxUtils/checker_macros.h" #include "TestTools/leakcheck.h" #include "GaudiKernel/MsgStream.h" #include <cassert> @@ -57,7 +58,7 @@ void testit (const AFP_SIDLocRecoEvCollection& trans1) } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE () { std::cout << "test1\n"; Athena_test::Leakcheck check; @@ -76,7 +77,7 @@ void test1() } -int main() +int main ATLAS_NOT_THREAD_SAFE () { std::cout << "AFP_EventTPCnv/AFP_SIDLocRecoEvCollectionCnv_p1_test\n"; test1(); diff --git a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_SIDLocRecoEventCnv_p1_test.cxx b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_SIDLocRecoEventCnv_p1_test.cxx index 5e3f46e2ef64..b1ccb3c148ff 100644 --- a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_SIDLocRecoEventCnv_p1_test.cxx +++ b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_SIDLocRecoEventCnv_p1_test.cxx @@ -11,6 +11,7 @@ #undef NDEBUG #include "AFP_EventTPCnv/AFP_SIDLocRecoEventCnv_p1.h" +#include "CxxUtils/checker_macros.h" #include "TestTools/leakcheck.h" #include "GaudiKernel/MsgStream.h" #include <cassert> @@ -47,7 +48,7 @@ void testit (const AFP_SIDLocRecoEvent& trans1) } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE () { std::cout << "test1\n"; Athena_test::Leakcheck check; @@ -61,7 +62,7 @@ void test1() } -int main() +int main ATLAS_NOT_THREAD_SAFE () { std::cout << "AFP_EventTPCnv/AFP_SIDLocRecoEventCnv_p1_test\n"; test1(); diff --git a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_SIDSimHitCnv_p1_test.cxx b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_SIDSimHitCnv_p1_test.cxx index b52765ea2758..1e6d72222491 100644 --- a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_SIDSimHitCnv_p1_test.cxx +++ b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_SIDSimHitCnv_p1_test.cxx @@ -11,6 +11,7 @@ #undef NDEBUG #include "AFP_EventTPCnv/AFP_SIDSimHitCnv_p1.h" +#include "CxxUtils/checker_macros.h" #include "TestTools/leakcheck.h" #include "GaudiKernel/MsgStream.h" #include <cassert> @@ -53,7 +54,7 @@ void testit (const AFP_SIDSimHit& trans1) } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE () { std::cout << "test1\n"; Athena_test::Leakcheck check; @@ -81,7 +82,7 @@ void test1() } -int main() +int main ATLAS_NOT_THREAD_SAFE () { std::cout << "AFP_EventTPCnv/AFP_SIDSimHitCnv_p1_test\n"; test1(); diff --git a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_SiDigiCnv_p1_test.cxx b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_SiDigiCnv_p1_test.cxx index 96e75af13620..477857c2e2ef 100644 --- a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_SiDigiCnv_p1_test.cxx +++ b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_SiDigiCnv_p1_test.cxx @@ -11,6 +11,7 @@ #undef NDEBUG #include "AFP_EventTPCnv/AFP_SiDigiCnv_p1.h" +#include "CxxUtils/checker_macros.h" #include "TestTools/leakcheck.h" #include "GaudiKernel/MsgStream.h" #include <cassert> @@ -42,7 +43,7 @@ void testit (const AFP_SiDigi& trans1) } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE () { std::cout << "test1\n"; Athena_test::Leakcheck check; @@ -59,7 +60,7 @@ void test1() } -int main() +int main ATLAS_NOT_THREAD_SAFE () { std::cout << "AFP_EventTPCnv/AFP_SiDigiCnv_p1_test\n"; test1(); diff --git a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_TDDigiCnv_p1_test.cxx b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_TDDigiCnv_p1_test.cxx index e6081994eced..d4c3c9c66839 100644 --- a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_TDDigiCnv_p1_test.cxx +++ b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_TDDigiCnv_p1_test.cxx @@ -11,6 +11,7 @@ #undef NDEBUG #include "AFP_EventTPCnv/AFP_TDDigiCnv_p1.h" +#include "CxxUtils/checker_macros.h" #include "TestTools/leakcheck.h" #include "GaudiKernel/MsgStream.h" #include <cassert> @@ -41,7 +42,7 @@ void testit (const AFP_TDDigi& trans1) } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE () { std::cout << "test1\n"; Athena_test::Leakcheck check; @@ -57,7 +58,7 @@ void test1() } -int main() +int main ATLAS_NOT_THREAD_SAFE () { std::cout << "AFP_EventTPCnv/AFP_TDDigiCnv_p1_test\n"; test1(); diff --git a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_TDLocRecoEvCollectionCnv_p1_test.cxx b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_TDLocRecoEvCollectionCnv_p1_test.cxx index 8aa7b3813c52..323e5192f330 100644 --- a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_TDLocRecoEvCollectionCnv_p1_test.cxx +++ b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_TDLocRecoEvCollectionCnv_p1_test.cxx @@ -11,6 +11,7 @@ #undef NDEBUG #include "AFP_EventTPCnv/AFP_TDLocRecoEvCollectionCnv_p1.h" +#include "CxxUtils/checker_macros.h" #include "TestTools/leakcheck.h" #include "GaudiKernel/MsgStream.h" #include <cassert> @@ -52,7 +53,7 @@ void testit (const AFP_TDLocRecoEvCollection& trans1) } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE () { std::cout << "test1\n"; Athena_test::Leakcheck check; @@ -69,7 +70,7 @@ void test1() } -int main() +int main ATLAS_NOT_THREAD_SAFE () { std::cout << "AFP_EventTPCnv/AFP_TDLocRecoEvCollectionCnv_p1_test\n"; test1(); diff --git a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_TDLocRecoEventCnv_p1_test.cxx b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_TDLocRecoEventCnv_p1_test.cxx index ebfeeddbc1ce..367668512b9a 100644 --- a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_TDLocRecoEventCnv_p1_test.cxx +++ b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_TDLocRecoEventCnv_p1_test.cxx @@ -11,6 +11,7 @@ #undef NDEBUG #include "AFP_EventTPCnv/AFP_TDLocRecoEventCnv_p1.h" +#include "CxxUtils/checker_macros.h" #include "TestTools/leakcheck.h" #include "GaudiKernel/MsgStream.h" #include <cassert> @@ -42,7 +43,7 @@ void testit (const AFP_TDLocRecoEvent& trans1) } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE () { std::cout << "test1\n"; Athena_test::Leakcheck check; @@ -54,7 +55,7 @@ void test1() } -int main() +int main ATLAS_NOT_THREAD_SAFE () { std::cout << "AFP_EventTPCnv/AFP_TDLocRecoEventCnv_p1_test\n"; test1(); diff --git a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_TDSimHitCnv_p1_test.cxx b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_TDSimHitCnv_p1_test.cxx index bfffc91bb142..b1f5ce82beb1 100644 --- a/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_TDSimHitCnv_p1_test.cxx +++ b/ForwardDetectors/AFP/AFP_EventCnv/AFP_EventTPCnv/test/AFP_TDSimHitCnv_p1_test.cxx @@ -11,6 +11,7 @@ #undef NDEBUG #include "AFP_EventTPCnv/AFP_TDSimHitCnv_p1.h" +#include "CxxUtils/checker_macros.h" #include "TestTools/leakcheck.h" #include "GaudiKernel/MsgStream.h" #include <cassert> @@ -52,7 +53,7 @@ void testit (const AFP_TDSimHit& trans1) } -void test1() +void test1 ATLAS_NOT_THREAD_SAFE () { std::cout << "test1\n"; Athena_test::Leakcheck check; @@ -79,7 +80,7 @@ void test1() } -int main() +int main ATLAS_NOT_THREAD_SAFE () { std::cout << "AFP_EventTPCnv/AFP_TDSimHitCnv_p1_test\n"; test1(); -- GitLab