diff --git a/Control/xAODRootAccess/xAODRootAccess/tools/TReturnCode.h b/Control/xAODRootAccess/xAODRootAccess/tools/TReturnCode.h
index dab7eaac86b2b2d2f88da8c7eba48649fab0c88a..eda9d6a535dcdd5141698bb59fbd88ede294ba50 100644
--- a/Control/xAODRootAccess/xAODRootAccess/tools/TReturnCode.h
+++ b/Control/xAODRootAccess/xAODRootAccess/tools/TReturnCode.h
@@ -1,7 +1,7 @@
 // Dear emacs, this is -*- c++ -*-
 
 /*
-  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: TReturnCode.h 598368 2014-05-22 10:23:54Z krasznaa $
@@ -27,7 +27,17 @@ namespace xAOD {
    /// $Revision: 598368 $
    /// $Date: 2014-05-22 12:23:54 +0200 (Thu, 22 May 2014) $
    ///
-   class [[nodiscard]] TReturnCode {
+   class
+#ifndef __CLING__
+   // cppyy will generate wrappers both for functions returning a value
+   // and the value being discarded.  If we have [[nodiscard]] on,
+   // then we'll get warnings when cling compiles these wrappers.
+   // Since these wrappers are automatically generated by cppyy,
+   // we can't really avoid these other than by disabling them
+   // for the cling case.
+   [[nodiscard]]
+#endif
+   TReturnCode {
 
    public:
       /// Enumeration listing the possible return codes