diff --git a/Control/AthenaExamples/AthAsgExUnittest/test/gt_MockxAODJet.cxx b/Control/AthenaExamples/AthAsgExUnittest/test/gt_MockxAODJet.cxx
index 00fc99acdeb999bf1751e9c6c7191ac3e5523a19..9480ef807da85c102f171730af5a6ca6fbce7519 100644
--- a/Control/AthenaExamples/AthAsgExUnittest/test/gt_MockxAODJet.cxx
+++ b/Control/AthenaExamples/AthAsgExUnittest/test/gt_MockxAODJet.cxx
@@ -1,6 +1,6 @@
 
 //
-//  Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
+//  Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
 //
 
 #include "xAODJet/Jet.h"
@@ -11,6 +11,12 @@ using ::testing::Return;
 using ::testing::_;
 using ::testing::SetArgReferee;
 
+// Suppress a false positive from gtest.
+#if __GNUC__ >= 12
+# pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
+#endif
+
+
 namespace Athena_test {
 
   // Mock for xAOD::Jet with method handle Jet::getAttribute<T>