Code indexing in gitaly is broken and leads to code not being visible to the user. We work on the issue with highest priority.

Skip to content
Snippets Groups Projects
Commit 76c9e561 authored by snuverink_j's avatar snuverink_j
Browse files

fix unused argument warnings: apply patch from Christof

parent bc5873b2
No related branches found
No related tags found
1 merge request!287Resolve "Compiler warnings from unit and IPPL tests"
......@@ -14,7 +14,7 @@
#include <fstream>
using namespace std;
vector< vector<double> > partialsDerivB(const Vector_t &R,const Vector_t B, double stepSize, SBendRep* dummyField)
vector< vector<double> > partialsDerivB(const Vector_t &R,const Vector_t /*B*/, double stepSize, SBendRep* dummyField)
{
// builds a matrix of all partial derivatives of B -> dx_i B_j
vector< vector<double> > allPartials(3, vector<double>(3));
......@@ -35,7 +35,7 @@ vector< vector<double> > partialsDerivB(const Vector_t &R,const Vector_t B, doub
return allPartials;
}
vector< vector<double> > partialsDerivB_5(const Vector_t &R,const Vector_t B, double stepSize, SBendRep* dummyField)
vector< vector<double> > partialsDerivB_5(const Vector_t &R,const Vector_t /*B*/, double stepSize, SBendRep* dummyField)
{
// builds a matrix of all partial derivatives of B -> dx_i B_j
vector< vector<double> > allPartials(3, vector<double>(3));
......@@ -206,4 +206,4 @@ TEST(Quad, Quadrupole)
gout.close();
cout<<"length: "<<quad->getElementLength()<<endl;
}
}
\ No newline at end of file
......@@ -36,7 +36,7 @@ using namespace std;
return allPartials;
}*/
vector< vector<double> > partialsDerivB(const Vector_t &R,const Vector_t B, double stepSize, Component* dummyField)
vector< vector<double> > partialsDerivB(const Vector_t &R,const Vector_t /*B*/, double stepSize, Component* dummyField)
{
// builds a matrix of all partial derivatives of B -> dx_i B_j
vector< vector<double> > allPartials(3, vector<double>(3));
......@@ -123,7 +123,7 @@ TEST(MultipoleTTest, Maxwell) {
TEST(MultipoleTTest, CurvedMagnet) {
OpalTestUtilities::SilenceTest silencer;
MultipoleT* myMagnet = new MultipoleT("Combined function");
myMagnet->setLength(4.4);
myMagnet->setBoundingBoxLength(0.0);
......@@ -176,7 +176,7 @@ TEST(MultipoleTTest, CurvedMagnet) {
TEST(MultipoleTTest, Straight) {
// failing
OpalTestUtilities::SilenceTest silencer;
MultipoleTStraight* myMagnet = new MultipoleTStraight("Combined function");
myMagnet->setLength(4.4);
myMagnet->setAperture(3.5, 3.5);
......@@ -220,7 +220,7 @@ TEST(MultipoleTTest, Straight) {
TEST(MultipoleTTest, CurvedConstRadius) {
OpalTestUtilities::SilenceTest silencer;
MultipoleTCurvedConstRadius* myMagnet = new MultipoleTCurvedConstRadius("Combined function");
myMagnet->setLength(4.4);
myMagnet->setBendAngle(0.628);
......@@ -270,7 +270,7 @@ TEST(MultipoleTTest, CurvedConstRadius) {
TEST(MultipoleTTest, CurvedVarRadius) {
OpalTestUtilities::SilenceTest silencer;
MultipoleTCurvedVarRadius* myMagnet = new MultipoleTCurvedVarRadius("Combined function");
myMagnet->setLength(4.4);
myMagnet->setBendAngle(0.628);
......@@ -312,5 +312,4 @@ TEST(MultipoleTTest, CurvedVarRadius) {
<< "Del: " << div << " " << curl[0] << " " << curl[1] << " " << curl[2] << std::endl;
}
delete myMagnet;
}
}
\ No newline at end of file
......@@ -395,7 +395,7 @@ TEST(RingTest, TestApply2) {
}
void testField(double s, double r, double y, double phi,
double bx, double by, double bz, double tol) {
double bx, double by, double bz, double /*tol*/) {
double radius = 2.;
Ring ring("test");
PartData data;
......@@ -433,4 +433,4 @@ TEST(RingTest, TestApply3) {
testField(0.1, 0.15, 0.2, Physics::pi/6.,
3.*cos(Physics::pi/6)+1.*sin(Physics::pi/6),
-3.*sin(Physics::pi/6)+1.*cos(Physics::pi/6), 2., 1e-6);
}
}
\ No newline at end of file
......@@ -313,7 +313,7 @@ void plot(int n_points, std::vector<double> start, std::vector<double> end, Poly
test_index++;
}
#else // PolynomialPatchTest_MakePlots
void plot(int n_points, std::vector<double> start, std::vector<double> end, PolynomialPatch* patch, int n_grid_points, std::string title) {
void plot(int /*n_points*/, std::vector<double> /*start*/, std::vector<double> /*end*/, PolynomialPatch* /*patch*/, int /*n_grid_points*/, std::string /*title*/) {
}
#endif // PolynomialPatchTest_MakePlots
}
......
......@@ -1482,7 +1482,7 @@ TEST(Field, Transpose)
}
namespace {
void check( Field<int,D3>& f, int s1, int s2, int s3, int test)
void check( Field<int,D3>& f, int s1, int s2, int s3, int /*test*/)
{
Index I = f.getIndex(0);
Index J = f.getIndex(1);
......
......@@ -22,7 +22,7 @@ class TestElement : public ElementBase {
ElementBase* clone() const {return NULL;}
void accept(BeamlineVisitor& visitor) const {}
void accept(BeamlineVisitor& /*visitor*/) const {}
private:
BGeometryBase* base;
......
......@@ -57,7 +57,7 @@ public:
bool apply(const size_t&, const double&, Vector_t&, Vector_t&) {
return true;
}
bool apply(const Vector_t& r, const Vector_t& P, const double& t,
bool apply(const Vector_t& r, const Vector_t& /*P*/, const double& /*t*/,
Vector_t& E, Vector_t& B) {
if (r(0) < 0. || r(0) > 1. ||
r(1) < -1. || r(1) > 0. ||
......@@ -103,7 +103,7 @@ public:
bool apply(const size_t&, const double&, Vector_t&, Vector_t&) {
return true;
}
bool apply(const Vector_t& r, const Vector_t& P, const double& t,
bool apply(const Vector_t& r, const Vector_t& /*P*/, const double& /*t*/,
Vector_t& E, Vector_t& B) {
lastPos = r;
if (r(0) < -1. || r(0) > 1. ||
......@@ -132,5 +132,4 @@ private:
};
#endif
#endif
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment