From 45d93701f898343e804e61e2c03198fba27cd7ff Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Tue, 26 Sep 2017 18:33:00 +0300 Subject: [PATCH 1/3] Open3DGC: Fix some uninitialized variable warnings --- contrib/Open3DGC/o3dgcSC3DMCDecoder.inl | 2 +- contrib/Open3DGC/o3dgcSC3DMCEncoder.inl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/contrib/Open3DGC/o3dgcSC3DMCDecoder.inl b/contrib/Open3DGC/o3dgcSC3DMCDecoder.inl index d36b62f2b..aa6f24b73 100644 --- a/contrib/Open3DGC/o3dgcSC3DMCDecoder.inl +++ b/contrib/Open3DGC/o3dgcSC3DMCDecoder.inl @@ -425,7 +425,7 @@ namespace o3dgc const AdjacencyInfo & v2T = m_triangleListDecoder.GetVertexToTriangle(); const T * const triangles = ifs.GetCoordIndex(); Vec3 p1, p2, p3, n0, nt; - long na0, nb0; + long na0 = 0, nb0 = 0; Real rna0, rnb0, norm0; char ni0 = 0, ni1 = 0; long a, b, c; diff --git a/contrib/Open3DGC/o3dgcSC3DMCEncoder.inl b/contrib/Open3DGC/o3dgcSC3DMCEncoder.inl index b2c438814..2d30b05a2 100644 --- a/contrib/Open3DGC/o3dgcSC3DMCEncoder.inl +++ b/contrib/Open3DGC/o3dgcSC3DMCEncoder.inl @@ -762,8 +762,8 @@ namespace o3dgc const Real * const originalNormals = ifs.GetNormal(); Vec3 p1, p2, p3, n0, nt; Vec3 n1; - long na0, nb0; - Real rna0, rnb0, na1, nb1, norm0, norm1; + long na0 = 0, nb0 = 0; + Real rna0, rnb0, na1 = 0, nb1 = 0, norm0, norm1; char ni0 = 0, ni1 = 0; long a, b, c, v; m_predictors.Clear(); From 77ce6e562d22d042cd79b60f73bf885e711dcc41 Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Sat, 30 Sep 2017 16:35:11 +0300 Subject: [PATCH 2/3] Fix CMAKE option name --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index b404e6916..8b16c278d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -78,7 +78,7 @@ OPTION ( ASSIMP_COVERALLS "Enable this to measure test coverage." OFF ) -OPTION ( ASSIMP_WERRRO +OPTION ( ASSIMP_WERROR "Treat warnings as errors." OFF ) From f7b2380f864ff620ab7e4ddafb24715e5e99c244 Mon Sep 17 00:00:00 2001 From: Turo Lamminen Date: Sat, 30 Sep 2017 16:35:41 +0300 Subject: [PATCH 3/3] travis: Treat warnings as errors --- .travis.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.sh b/.travis.sh index 7161fd28d..2b09da35e 100755 --- a/.travis.sh +++ b/.travis.sh @@ -1,6 +1,6 @@ function generate() { - cmake -G "Unix Makefiles" -DASSIMP_NO_EXPORT=$TRAVIS_NO_EXPORT -DBUILD_SHARED_LIBS=$SHARED_BUILD -DASSIMP_COVERALLS=$ENABLE_COVERALLS + cmake -G "Unix Makefiles" -DASSIMP_NO_EXPORT=$TRAVIS_NO_EXPORT -DBUILD_SHARED_LIBS=$SHARED_BUILD -DASSIMP_COVERALLS=$ENABLE_COVERALLS -DASSIMP_ERROR=ON } if [ $ANDROID ]; then