diff --git a/MeshLib/MeshGenerators/MeshGenerator.cpp b/MeshLib/MeshGenerators/MeshGenerator.cpp
index 5a9e51976f830b32203ec2e62ebfca002ced36f7..32eb005b827524648a24376b2d03e0270a342d16 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, node_id = 0; i < n_y_nodes; i++)
+	for (std::size_t i = 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, node_id = 0; i < n_z_nodes; i++)
+	for (std::size_t i = 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++)