Skip to content

Commit b289563

Browse files
committed
#200 Suppress warnings
1 parent 81d3109 commit b289563

2 files changed

Lines changed: 23 additions & 5 deletions

File tree

CDT/include/Triangulation.h

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -289,6 +289,11 @@ struct CDT_EXPORT TriangleChangeType
289289
};
290290
};
291291

292+
// parameter names are used for documentation purposes, even if they are un-used
293+
// in the interface's default implementation
294+
#pragma GCC diagnostic push
295+
#pragma GCC diagnostic ignored "-Wunused-parameter"
296+
292297
/**
293298
* Interface for the callback handler that user can derive from and inject into
294299
* the triangulation to monitor certain events or order aborting the calculation
@@ -384,6 +389,10 @@ class CDT_EXPORT ICallbackHandler
384389
};
385390
};
386391

392+
// parameter names are used for documentation purposes, even if they are
393+
// un-used in the interface's default implementation
394+
#pragma GCC diagnostic pop
395+
387396
#endif
388397

389398
/**

CDT/tests/cdt.test.cpp

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -967,6 +967,10 @@ TEST_CASE("Callbacks test: count number of callback calls")
967967
auto cdt = Triangulation<double>();
968968
// REQUIRE(sizeof(cdt) == 368);
969969

970+
// parameter names are used for documentation purposes, even if they are un-used
971+
// in the interface's default implementation
972+
#pragma GCC diagnostic push
973+
#pragma GCC diagnostic ignored "-Wunused-parameter"
970974
struct CallbackHandler final : public CDT::ICallbackHandler
971975
{
972976
void onAddSuperTriangle() override
@@ -1016,11 +1020,16 @@ TEST_CASE("Callbacks test: count number of callback calls")
10161020
nModifiedTriangles += tris.size();
10171021
}
10181022

1019-
int nAddedVertices = 0;
1020-
int nModifiedTriangles = 0;
1021-
int nAddedTriangles = 0;
1022-
int nAddedEdges = 0;
1023+
std::size_t nAddedVertices = 0;
1024+
std::size_t nModifiedTriangles = 0;
1025+
std::size_t nAddedTriangles = 0;
1026+
std::size_t nAddedEdges = 0;
10231027
};
1028+
1029+
// parameter names are used for documentation purposes, even if they are
1030+
// un-used in the interface's default implementation
1031+
#pragma GCC diagnostic pop
1032+
10241033
CallbackHandler callbackHandler;
10251034
cdt.setCallbackHandler(&callbackHandler);
10261035

@@ -1073,7 +1082,7 @@ TEST_CASE("Callbacks test: test aborting the calculation")
10731082
{
10741083
struct CallbackHandler final : public CDT::ICallbackHandler
10751084
{
1076-
void onAddEdgeStart(const Edge& edge) override
1085+
void onAddEdgeStart(const Edge& /*edge*/) override
10771086
{
10781087
++n;
10791088
}

0 commit comments

Comments
 (0)