From a771ababb5a7323e490488e36e4c060143af685d Mon Sep 17 00:00:00 2001 From: Maximilian Reininghaus <maximilian.reininghaus@kit.edu> Date: Tue, 14 Mar 2023 15:43:06 +0100 Subject: [PATCH] add [[maybe_unused]] --- modules/fluka/fluka.cpp | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/modules/fluka/fluka.cpp b/modules/fluka/fluka.cpp index 1843eab1b..afd7b2aba 100644 --- a/modules/fluka/fluka.cpp +++ b/modules/fluka/fluka.cpp @@ -9,17 +9,6 @@ #include <FLUKA.hpp> namespace fluka { - - /** - * The following (function) pointers make sure the corresponding objects in libflukahp.a - * won't get dropped from the final file during linking. - */ - - auto* const hepevt_ptr = &hepevt_; - auto* const stpxyc_ptr = &stpxyz_; - auto* const evtxyz_ptr = &evtxyz_; - auto* const sgmxyz_ptr = &sgmxyz_; - double (*rndmPtr)() = &rndm_interface; extern "C" { @@ -27,6 +16,16 @@ namespace fluka { //! overwrite function pointer to be used as FLUKA RNG (flrndm_()) void setFlukaRNG(double (*func)()) { ::fluka::rndmPtr = func; } + + /** + * The following (function) pointers make sure the corresponding objects in libflukahp.a + * won't get dropped from the final file during linking. + */ + + [[maybe_unused]] auto* const hepevt_ptr = &hepevt_; + [[maybe_unused]] auto* const stpxyc_ptr = &stpxyz_; + [[maybe_unused]] auto* const evtxyz_ptr = &evtxyz_; + [[maybe_unused]] auto* const sgmxyz_ptr = &sgmxyz_; } } // namespace fluka -- GitLab