浏览代码

Merge pull request #1465 from turol/warnings

Make Travis treat warnings as errors
Kim Kulling 8 年之前
父节点
当前提交
94860ff66e
共有 4 个文件被更改,包括 5 次插入5 次删除
  1. 1 1
      .travis.sh
  2. 1 1
      CMakeLists.txt
  3. 1 1
      contrib/Open3DGC/o3dgcSC3DMCDecoder.inl
  4. 2 2
      contrib/Open3DGC/o3dgcSC3DMCEncoder.inl

+ 1 - 1
.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

+ 1 - 1
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
 )

+ 1 - 1
contrib/Open3DGC/o3dgcSC3DMCDecoder.inl

@@ -425,7 +425,7 @@ namespace o3dgc
         const AdjacencyInfo & v2T          = m_triangleListDecoder.GetVertexToTriangle();
         const T * const       triangles    = ifs.GetCoordIndex();        
         Vec3<long> 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;

+ 2 - 2
contrib/Open3DGC/o3dgcSC3DMCEncoder.inl

@@ -762,8 +762,8 @@ namespace o3dgc
         const Real * const originalNormals = ifs.GetNormal();
         Vec3<long> p1, p2, p3, n0, nt;
         Vec3<Real> 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();