From 9e95e3c50d7856b8fce9c395e625c5dd720866e7 Mon Sep 17 00:00:00 2001
From: Markus Frank <Markus.Frank@cern.ch>
Date: Tue, 16 Jul 2019 18:16:27 +0200
Subject: [PATCH] Fix clan warnings

---
 DDCore/include/DD4hep/detail/OpticalSurfaceManagerInterna.h | 2 +-
 DDDigi/include/DDDigi/DigiAction.h                          | 4 ++++
 examples/DDCodex/src/CODEXb_det.cpp                         | 1 -
 3 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/DDCore/include/DD4hep/detail/OpticalSurfaceManagerInterna.h b/DDCore/include/DD4hep/detail/OpticalSurfaceManagerInterna.h
index 6f7598669..de2ae1b04 100644
--- a/DDCore/include/DD4hep/detail/OpticalSurfaceManagerInterna.h
+++ b/DDCore/include/DD4hep/detail/OpticalSurfaceManagerInterna.h
@@ -58,7 +58,7 @@ namespace dd4hep {
       /// No move constructor
       OpticalSurfaceManagerObject(OpticalSurfaceManagerObject&& copy) = delete;
       /// No copy constructor
-      OpticalSurfaceManagerObject(const OpticalSurfaceManagerObject& copy) = default;
+      OpticalSurfaceManagerObject(const OpticalSurfaceManagerObject& copy) = delete;
       /// Initializing constructor
       OpticalSurfaceManagerObject(Detector& det) : detector(det) {}
       /// Default destructor
diff --git a/DDDigi/include/DDDigi/DigiAction.h b/DDDigi/include/DDDigi/DigiAction.h
index e85883312..c86633ef3 100644
--- a/DDDigi/include/DDDigi/DigiAction.h
+++ b/DDDigi/include/DDDigi/DigiAction.h
@@ -97,7 +97,11 @@ namespace dd4hep {
 
     protected:
       /// Reference to the Digi context
+#if defined(G__ROOT) || defined(__CLING__) || defined(__ROOTCLING__)
+      const DigiKernel*  m_kernel;
+#else
       const DigiKernel&  m_kernel;
+#endif
       /// Action name
       std::string        m_name;
       /// Property pool
diff --git a/examples/DDCodex/src/CODEXb_det.cpp b/examples/DDCodex/src/CODEXb_det.cpp
index e722c507a..04b6f285d 100755
--- a/examples/DDCodex/src/CODEXb_det.cpp
+++ b/examples/DDCodex/src/CODEXb_det.cpp
@@ -119,7 +119,6 @@ static Ref_t create_element(Detector& description, xml_h e, Ref_t sens)  {
   Stations super_stations;
   int num_super = 0;
   vector<PlacedVolume> super_places;
-  Box first_box;
   for(xml_coll_t i(x_det, _U(station)); i; ++i, ++num_super) {
     xml_comp_t station      = i;
     Volume     st_vol       = station_vols[num_super];
-- 
GitLab