From 828306d8785cde19fd5dab3500b56588c3b83a2e Mon Sep 17 00:00:00 2001
From: Christof Kraus <christof.kraus@psi.ch>
Date: Fri, 14 Feb 2020 20:18:18 +0100
Subject: [PATCH] =?UTF-8?q?fix=20compile=20warnings:=20'=E2=80=98bct?=
 =?UTF-8?q?=E2=80=99,=20=E2=80=98voffset=E2=80=98,=20=E2=80=98coffset?=
 =?UTF-8?q?=E2=80=98=20may=20be=20used=20uninitialized=20in=20this=20funct?=
 =?UTF-8?q?ion'=20and=20'comparison=20between=20signed=20and=20unsigned=20?=
 =?UTF-8?q?integer=20expressions'?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 ippl/src/Meshes/Cartesian.hpp                        |  6 +++---
 .../AbsBeamline/VerticalFFAMagnetTest.cpp            | 12 ++++++------
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/ippl/src/Meshes/Cartesian.hpp b/ippl/src/Meshes/Cartesian.hpp
index 3008cee15..589cf2e0d 100644
--- a/ippl/src/Meshes/Cartesian.hpp
+++ b/ippl/src/Meshes/Cartesian.hpp
@@ -28,6 +28,7 @@
 
 // include files
 #include "Utility/PAssert.h"
+#include "Utility/IpplException.h"
 #include "Utility/IpplInfo.h"
 #include "Field/BareField.h"
 #include "Field/BrickExpression.h"
@@ -995,8 +996,7 @@ storeSpacingFields(e_dim_tag* et, int vnodes)
       }
       break;
     default:
-      ERRORMSG("Cartesian::storeSpacingFields(): unknown MeshBC type" << endl);
-      break;
+        throw IpplException("Cartesian::storeSpacingFields", "unknown MeshBC type");
     }
 
     // Loop over all the LField's in the BareField's:
@@ -3325,4 +3325,4 @@ Average(Field<T1,3U,Cartesian<3U,MFLOAT>,Vert>& x,
  * $RCSfile: Cartesian.cpp,v $   $Author: adelmann $
  * $Revision: 1.1.1.1 $   $Date: 2003/01/23 07:40:27 $
  * IPPL_VERSION_ID: $Id: Cartesian.cpp,v 1.1.1.1 2003/01/23 07:40:27 adelmann Exp $
- ***************************************************************************/
+ ***************************************************************************/
\ No newline at end of file
diff --git a/tests/classic_src/AbsBeamline/VerticalFFAMagnetTest.cpp b/tests/classic_src/AbsBeamline/VerticalFFAMagnetTest.cpp
index f86f444a9..59a914948 100644
--- a/tests/classic_src/AbsBeamline/VerticalFFAMagnetTest.cpp
+++ b/tests/classic_src/AbsBeamline/VerticalFFAMagnetTest.cpp
@@ -115,7 +115,7 @@ TEST_F(VerticalFFAMagnetTest, BoundingBoxTest) {
 }
 
 TEST_F(VerticalFFAMagnetTest, MaxwellTest) {
-    // check the field is maxwellian. This is key test for the field model 
+    // check the field is maxwellian. This is key test for the field model
     double x = length_m*0.1;
     double y = length_m*0.05;
     double z = length_m*0.8;
@@ -134,7 +134,7 @@ TEST_F(VerticalFFAMagnetTest, MaxwellTest) {
         double curl = euclidean_norm(maxTest.curlB(pos, 0.));
         EXPECT_LT(abs(div), abs(divOld)) << i;
         EXPECT_LT(curl, 1e-11);
-        std::cerr << "Max Order: " << i << " |curlB|: " << curl 
+        std::cerr << "Max Order: " << i << " |curlB|: " << curl
                   << " DivB: " << div << std::endl;
         if ((i/2)*2 != i) { // div only improves on even orders
             divOld = div;
@@ -148,13 +148,13 @@ TEST_F(VerticalFFAMagnetTest, CoefficientsTest) {
     magnet_m->setMaxOrder(10);
     magnet_m->initialise();
     std::vector< std::vector<double> > coeffs = magnet_m->getDfCoefficients();
-    EXPECT_EQ(coeffs.size(), 11);
+    EXPECT_EQ(coeffs.size(), 11u);
     for (size_t i = 0; i < coeffs.size(); i++) {
         std::vector<double> cv = coeffs[i];
         if ((i/2)*2 == i) { // even
-            EXPECT_EQ(cv.size(), i+1);
+            EXPECT_EQ(cv.size(), i+1u);
         } else { // odd
-            EXPECT_EQ(cv.size(), 0);
+            EXPECT_EQ(cv.size(), 0u);
         }
     }
-}
+}
\ No newline at end of file
-- 
GitLab