Commit 84d654a3 authored by Martin Heistermann's avatar Martin Heistermann
Browse files

Enable many clang warnings and fix violations

parent fa13bef1
Pipeline #10592 passed with stage
in 4 minutes and 20 seconds
#include <gtest/gtest.h>
#ifdef __clang__
# pragma GCC diagnostic ignored "-Weverything"
#endif
int main(int _argc, char** _argv) {
testing::InitGoogleTest(&_argc, _argv);
......
......@@ -635,7 +635,7 @@ TEST_F(PolyhedralMeshBase, PolyhedralMeshColorTest) {
generatePolyhedralMesh(mesh_);
typedef OpenVolumeMesh::Geometry::Vec4f Vec4f;
using OpenVolumeMesh::Geometry::Vec4f;
// Request colors
ColorAttrib<Vec4f> colors(mesh_);
......@@ -1806,11 +1806,9 @@ TEST_F(HexahedralMeshBase, HalfFaceFetchFunction2) {
VertexHandle v0(0);
VertexHandle v1(1);
VertexHandle v2(2);
VertexHandle v3(3);
VertexHandle v4(4);
VertexHandle v5(5);
VertexHandle v6(6);
VertexHandle v7(7);
std::vector<VertexHandle> vs;
vs.push_back(v0); vs.push_back(v1); vs.push_back(v2);
......@@ -2002,7 +2000,7 @@ TEST_F(PolyhedralMeshBase, SwapVertices) {
EXPECT_EQ(12u, mesh_.n_vertices());
}
void testDeferredDelete(PolyhedralMesh &mesh) {
static void testDeferredDelete(PolyhedralMesh &mesh) {
mesh.add_vertex(Vec3d(1,0,0));
mesh.add_vertex(Vec3d(0,1,0));
mesh.delete_vertex(VertexHandle(0));
......
......@@ -8,6 +8,12 @@
#include <OpenVolumeMesh/Mesh/TetrahedralMesh.hh>
#include <OpenVolumeMesh/Geometry/VectorT.hh>
#ifdef __clang__
# pragma GCC diagnostic ignored "-Wglobal-constructors"
# pragma GCC diagnostic ignored "-Wzero-as-null-pointer-constant"
# pragma GCC diagnostic ignored "-Wundef"
#endif
#define EXPECT_HANDLE_EQ(a, b) EXPECT_EQ((a).idx(), (b).idx())
#define EXPECT_HANDLE_NE(a, b) EXPECT_NE((a).idx(), (b).idx())
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment