From 169cb7cff795c6e634d9aba7575afba7d60d74dc Mon Sep 17 00:00:00 2001
From: ralfulrich <ralf.ulrich@kit.edu>
Date: Mon, 1 Oct 2018 10:54:39 +0200
Subject: [PATCH] worked on some compiler warnings. there are more.

---
 Framework/Cascade/testCascade.cc                 |  1 +
 Framework/Logging/BufferedSink.h                 |  2 +-
 Framework/Logging/MessageOff.h                   |  2 +-
 Framework/ProcessSequence/testProcessSequence.cc |  8 ++++----
 Framework/Random/RNGManager.cc                   |  3 ++-
 Framework/Random/RNGManager.h                    |  2 +-
 Framework/StackInterface/ParticleBase.h          |  2 +-
 Framework/StackInterface/StackIterator.h         | 10 +++++-----
 Framework/Units/testUnits.cc                     |  1 +
 9 files changed, 17 insertions(+), 14 deletions(-)

diff --git a/Framework/Cascade/testCascade.cc b/Framework/Cascade/testCascade.cc
index 3279c4245..9d30afcef 100644
--- a/Framework/Cascade/testCascade.cc
+++ b/Framework/Cascade/testCascade.cc
@@ -1,6 +1,7 @@
 #include <corsika/cascade/Cascade.h>
 #include <corsika/geometry/LineTrajectory.h>
 #include <corsika/process/ProcessSequence.h>
+#include <corsika/process/stack_inspector/StackInspector.h>
 #include <corsika/stack/super_stupid/SuperStupidStack.h>
 
 #define CATCH_CONFIG_MAIN // This tells Catch to provide a main() - only do this in one
diff --git a/Framework/Logging/BufferedSink.h b/Framework/Logging/BufferedSink.h
index 7ad36927f..33cb1afa7 100644
--- a/Framework/Logging/BufferedSink.h
+++ b/Framework/Logging/BufferedSink.h
@@ -32,7 +32,7 @@ namespace corsika::logging {
       inline void Add(const std::string& s) { fBuffer << s; }
 
     private:
-      int fSize;
+      unsigned int fSize;
       std::ostringstream fBuffer;
     };
 
diff --git a/Framework/Logging/MessageOff.h b/Framework/Logging/MessageOff.h
index d60070002..266a4b7cf 100644
--- a/Framework/Logging/MessageOff.h
+++ b/Framework/Logging/MessageOff.h
@@ -10,7 +10,7 @@ namespace corsika::logging {
   class MessageOff {
   protected:
     template <typename First, typename... Strings>
-    std::string Message(const First& arg, const Strings&... rest) {
+    std::string Message(const First& , const Strings&... ) {
       return "";
     }
   };
diff --git a/Framework/ProcessSequence/testProcessSequence.cc b/Framework/ProcessSequence/testProcessSequence.cc
index eb8a8cbb9..820dcb285 100644
--- a/Framework/ProcessSequence/testProcessSequence.cc
+++ b/Framework/ProcessSequence/testProcessSequence.cc
@@ -16,7 +16,7 @@ public:
   Process1() {}
   void Init() {} // cout << "Process1::Init" << endl; }
   template <typename D, typename T, typename S>
-  inline EProcessReturn DoContinuous(D& d, T& t, S& s) const {
+  inline EProcessReturn DoContinuous(D& d, T& , S& ) const {
     for (int i = 0; i < 10; ++i) d.p[i] += 1 + i;
     return EProcessReturn::eOk;
   }
@@ -27,7 +27,7 @@ public:
   Process2() {}
   void Init() {} // cout << "Process2::Init" << endl; }
   template <typename D, typename T, typename S>
-  inline EProcessReturn DoContinuous(D& d, T& t, S& s) const {
+  inline EProcessReturn DoContinuous(D& d, T& , S& ) const {
     for (int i = 0; i < 10; ++i) d.p[i] *= 0.7;
     return EProcessReturn::eOk;
   }
@@ -38,7 +38,7 @@ public:
   Process3() {}
   void Init() {} // cout << "Process3::Init" << endl; }
   template <typename D, typename T, typename S>
-  inline EProcessReturn DoContinuous(D& d, T& t, S& s) const {
+  inline EProcessReturn DoContinuous(D& d, T& , S& ) const {
     for (int i = 0; i < 10; ++i) d.p[i] += 0.933;
     return EProcessReturn::eOk;
   }
@@ -49,7 +49,7 @@ public:
   Process4() {}
   void Init() {} // cout << "Process4::Init" << endl; }
   template <typename D, typename T, typename S>
-  inline EProcessReturn DoContinuous(D& d, T& t, S& s) const {
+  inline EProcessReturn DoContinuous(D& d, T& , S& ) const {
     for (int i = 0; i < 10; ++i) d.p[i] /= 1.2;
     return EProcessReturn::eOk;
   }
diff --git a/Framework/Random/RNGManager.cc b/Framework/Random/RNGManager.cc
index b65f59ab5..e28d9d57b 100644
--- a/Framework/Random/RNGManager.cc
+++ b/Framework/Random/RNGManager.cc
@@ -23,8 +23,9 @@ std::stringstream corsika::random::RNGManager::dumpState() const {
 
   return buffer;
 }
-
+/*
 void corsika::random::RNGManager::SetSeedSeq(std::string const& pStreamName,
                                              std::seed_seq const& pSeedSeq) {
   seeds[pStreamName] = pSeedSeq;
 }
+*/
diff --git a/Framework/Random/RNGManager.h b/Framework/Random/RNGManager.h
index a3a6d4e53..9d19305c9 100644
--- a/Framework/Random/RNGManager.h
+++ b/Framework/Random/RNGManager.h
@@ -42,7 +42,7 @@ namespace corsika::random {
     /**
      * set seed_seq of \a pStreamName to \a pSeedSeq
      */
-    void SetSeedSeq(std::string const& pStreamName, std::seed_seq& const pSeedSeq);
+    //void SetSeedSeq(std::string const& pStreamName, std::seed_seq& const pSeedSeq);
   };
 
 } // namespace corsika::random
diff --git a/Framework/StackInterface/ParticleBase.h b/Framework/StackInterface/ParticleBase.h
index aa0bb3d11..b90712929 100644
--- a/Framework/StackInterface/ParticleBase.h
+++ b/Framework/StackInterface/ParticleBase.h
@@ -48,6 +48,6 @@ namespace corsika::stack {
     int GetIndex() const { return GetIterator().GetIndex(); }
   };
 
-}; // namespace corsika::stack
+} // namespace corsika::stack
 
 #endif
diff --git a/Framework/StackInterface/StackIterator.h b/Framework/StackInterface/StackIterator.h
index 2045f785d..bcbb8340d 100644
--- a/Framework/StackInterface/StackIterator.h
+++ b/Framework/StackInterface/StackIterator.h
@@ -56,18 +56,18 @@ namespace corsika::stack {
   public:
     // StackIterator() : fData(0), fIndex(0) { }
     StackIteratorInterface(StackType& data, const int index)
-        : fData(&data)
-        , fIndex(index) {}
+        : fIndex(index)
+        , fData(&data) {}
 
   private:
     StackIteratorInterface(const StackIteratorInterface& mit)
-        : fData(mit.fData)
-        , fIndex(mit.fIndex) {}
+        : fIndex(mit.fIndex)
+        , fData(mit.fData) {}
 
   public:
     StackIteratorInterface& operator=(const StackIteratorInterface& mit) {
-      fData = mit.fData;
       fIndex = mit.fIndex;
+      fData = mit.fData;
       return *this;
     }
 
diff --git a/Framework/Units/testUnits.cc b/Framework/Units/testUnits.cc
index 6e77e4a01..225e11426 100644
--- a/Framework/Units/testUnits.cc
+++ b/Framework/Units/testUnits.cc
@@ -20,6 +20,7 @@ TEST_CASE("PhysicalUnits", "[Units]") {
     REQUIRE(E1 == 10_GeV);
 
     LengthType l1 = 10_nm;
+    l1=l1;
 
     LengthType arr0[5];
     arr0[0] = 5_m;
-- 
GitLab