diff --git a/MeshLib/MeshGenerators/MeshGenerator.cpp b/MeshLib/MeshGenerators/MeshGenerator.cpp index 32eb005b827524648a24376b2d03e0270a342d16..5a9e51976f830b32203ec2e62ebfca002ced36f7 100644 --- a/MeshLib/MeshGenerators/MeshGenerator.cpp +++ b/MeshLib/MeshGenerators/MeshGenerator.cpp @@ -79,7 +79,7 @@ Mesh* MeshGenerator::generateRegularQuadMesh(const unsigned n_x_cells, std::vector<Node*> nodes; nodes.reserve(n_x_nodes * n_y_nodes); - for (std::size_t i = 0; i < n_y_nodes; i++) + for (std::size_t i = 0, node_id = 0; i < n_y_nodes; i++) { const double y_offset (origin[1] + cell_size * i); for (std::size_t j = 0; j < n_x_nodes; j++) @@ -130,7 +130,7 @@ Mesh* MeshGenerator::generateRegularHexMesh(const unsigned n_x_cells, std::vector<Node*> nodes; nodes.reserve(n_x_nodes * n_y_nodes * n_z_nodes); - for (std::size_t i = 0; i < n_z_nodes; i++) + for (std::size_t i = 0, node_id = 0; i < n_z_nodes; i++) { const double z_offset (origin[2] + cell_size * i); for (std::size_t j = 0; j < n_y_nodes; j++) diff --git a/Tests/MeshLib/TestTriLineMesh.cpp b/Tests/MeshLib/TestTriLineMesh.cpp index 910315cb8b42b0f4c6e3c9aaf0fa67554f55e167..ce9997241e6e9a2ec01ecb6bcb76eb17214ca04b 100644 --- a/Tests/MeshLib/TestTriLineMesh.cpp +++ b/Tests/MeshLib/TestTriLineMesh.cpp @@ -77,8 +77,6 @@ class MeshLibTriLineMesh : public ::testing::Test bool elementIsNeigborOf(std::size_t const a, std::size_t const b) const { - (void)a; // Avoid GCC warning - (void)b; return false; } };