From 7216a6dfcb1d442eeea90be3a10811dd7167a1f5 Mon Sep 17 00:00:00 2001 From: Karsten Rink <karsten.rink@ufz.de> Date: Mon, 14 May 2012 10:17:45 +0200 Subject: [PATCH] removed some warnings --- MeshLib/Elements/Edge.h | 10 +++++----- MeshLib/Elements/Face.h | 2 +- MeshLib/Elements/Hex.h | 2 +- MeshLib/Elements/Prism.cpp | 2 +- MeshLib/Elements/Tet.h | 2 +- SimpleTests/MeshTests/MeshRead.cpp | 2 -- 6 files changed, 9 insertions(+), 11 deletions(-) diff --git a/MeshLib/Elements/Edge.h b/MeshLib/Elements/Edge.h index 5f83e3c1857..1d1ba8117d6 100644 --- a/MeshLib/Elements/Edge.h +++ b/MeshLib/Elements/Edge.h @@ -39,16 +39,16 @@ public: virtual ~Edge(); /// Returns the edge i of the element. - const Element* getEdge(unsigned i) const { return NULL; }; + const Element* getEdge(unsigned i) const { (void)i; return NULL; }; /// Returns the face i of the element. - const Element* getFace(unsigned i) const { return NULL; }; + const Element* getFace(unsigned i) const { (void)i; return NULL; }; /// 1D elements have no edges unsigned getNEdges() const { return 0; }; /// Get the number of nodes for face i. - unsigned getNFaceNodes(unsigned i) const { return 0; }; + unsigned getNFaceNodes(unsigned i) const { (void)i; return 0; }; /// Get the number of faces for this element. unsigned getNFaces() const { return 0; }; @@ -71,10 +71,10 @@ protected: double computeLength(); /// 1D elements have no edges. - Node* getEdgeNode(unsigned edge_id, unsigned node_id) const { return NULL; }; + Node* getEdgeNode(unsigned edge_id, unsigned node_id) const { (void)edge_id; (void)node_id; return NULL; }; /// 1D elements have no faces. - Node* getFaceNode(unsigned face_id, unsigned node_id) const { return NULL; }; + Node* getFaceNode(unsigned face_id, unsigned node_id) const { (void)face_id; (void)node_id; return NULL; }; double _length; diff --git a/MeshLib/Elements/Face.h b/MeshLib/Elements/Face.h index 6cb14a41aeb..492b02fa6a4 100644 --- a/MeshLib/Elements/Face.h +++ b/MeshLib/Elements/Face.h @@ -28,7 +28,7 @@ public: const Element* getFace(unsigned i) const { return this->getEdge(i); }; /// Get the number of nodes for face i. - unsigned getNFaceNodes(unsigned i) const { return 2; }; + unsigned getNFaceNodes(unsigned i) const { (void)i; return 2; }; /// 2D elements have no faces. unsigned getNFaces() const { return 0; }; diff --git a/MeshLib/Elements/Hex.h b/MeshLib/Elements/Hex.h index bc221c97ac5..68fa469be21 100644 --- a/MeshLib/Elements/Hex.h +++ b/MeshLib/Elements/Hex.h @@ -53,7 +53,7 @@ public: unsigned getNEdges() const { return 12; }; /// Get the number of nodes for face i. - unsigned getNFaceNodes(unsigned i) const { return 4; }; + unsigned getNFaceNodes(unsigned i) const { (void)i; return 4; }; /// Get the number of faces for this element. unsigned getNFaces() const { return 6; }; diff --git a/MeshLib/Elements/Prism.cpp b/MeshLib/Elements/Prism.cpp index e27affafba8..a90386e1f2e 100644 --- a/MeshLib/Elements/Prism.cpp +++ b/MeshLib/Elements/Prism.cpp @@ -42,7 +42,7 @@ const unsigned Prism::_n_face_nodes[5] = { 3, 4, 4, 4, 3 }; Prism::Prism(Node* nodes[6], unsigned value) : Cell(MshElemType::PRISM, value) { - _nodes = _nodes; + _nodes = nodes; _neighbors = new Element*[5]; for (unsigned i=0; i<5; i++) _neighbors[i] = NULL; diff --git a/MeshLib/Elements/Tet.h b/MeshLib/Elements/Tet.h index 8eed8e4cd70..a0bec989b33 100644 --- a/MeshLib/Elements/Tet.h +++ b/MeshLib/Elements/Tet.h @@ -52,7 +52,7 @@ public: unsigned getNEdges() const { return 6; }; /// Get the number of nodes for face i. - unsigned getNFaceNodes(unsigned i) const { return 3; }; + unsigned getNFaceNodes(unsigned i) const { (void)i; return 3; }; /// Get the number of faces for this element. unsigned getNFaces() const { return 4; }; diff --git a/SimpleTests/MeshTests/MeshRead.cpp b/SimpleTests/MeshTests/MeshRead.cpp index e0d0e57f533..0cca029a58f 100644 --- a/SimpleTests/MeshTests/MeshRead.cpp +++ b/SimpleTests/MeshTests/MeshRead.cpp @@ -18,13 +18,11 @@ int main(int argc, char *argv[]) { std::string file_name("/mnt/visdata/tom/data/TestMeshes/Mesh-dx1.00-Layered20.msh"); - std::cout << "sizeof(double): " << sizeof (double) << std::endl; std::cout << "sizeof(GeoLib::Point): " << sizeof (GEOLIB::Point) << std::endl; std::cout << "sizeof(GeoLib::PointWithID): " << sizeof (GEOLIB::PointWithID) << std::endl; std::cout << "sizeof(Node): " << sizeof (MeshLib::Node) << std::endl; std::cout << "sizeof(Element): " << sizeof (MeshLib::Element) << std::endl; - //std::string file_name("c:/Project/PlyTestMesh.msh"); FileIO::MeshIO mesh_io; #ifndef WIN32 -- GitLab