Fix a bunch of compiler warnings. Change-Id: Iacc3beff295d4f4f6334ef598b10c73de509b3c0
diff --git a/CMakeLists.txt b/CMakeLists.txt index 7deaeb5..f10fc3f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -617,7 +617,7 @@ # GCC is not strict enough by default, so enable most of the warnings. IF ("${UNIX}") SET(CMAKE_CXX_FLAGS - "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-sign-compare -Wno-unused") + "${CMAKE_CXX_FLAGS} -Wall -Wextra -Wno-unknown-pragmas -Wno-sign-compare -Wno-unused -Wno-unused-parameter") ENDIF ("${UNIX}") ADD_SUBDIRECTORY(internal/ceres)
diff --git a/internal/ceres/block_jacobi_preconditioner.h b/internal/ceres/block_jacobi_preconditioner.h index 91cfedd..51f2655 100644 --- a/internal/ceres/block_jacobi_preconditioner.h +++ b/internal/ceres/block_jacobi_preconditioner.h
@@ -37,7 +37,7 @@ namespace ceres { namespace internal { -class CompressedRowBlockStructure; +struct CompressedRowBlockStructure; class LinearOperator; class SparseMatrix;
diff --git a/internal/ceres/canonical_views_clustering.h b/internal/ceres/canonical_views_clustering.h index 2d1eb40..171ac55 100644 --- a/internal/ceres/canonical_views_clustering.h +++ b/internal/ceres/canonical_views_clustering.h
@@ -52,7 +52,7 @@ namespace ceres { namespace internal { -class CanonicalViewsClusteringOptions; +struct CanonicalViewsClusteringOptions; // Compute a partitioning of the vertices of the graph using the // canonical views clustering algorithm.
diff --git a/internal/ceres/compressed_row_sparse_matrix.h b/internal/ceres/compressed_row_sparse_matrix.h index 6a9d828..10f96c0 100644 --- a/internal/ceres/compressed_row_sparse_matrix.h +++ b/internal/ceres/compressed_row_sparse_matrix.h
@@ -42,7 +42,7 @@ namespace ceres { -class CRSMatrix; +struct CRSMatrix; namespace internal {
diff --git a/internal/ceres/evaluator.h b/internal/ceres/evaluator.h index 6aa30d7..3bbf50a 100644 --- a/internal/ceres/evaluator.h +++ b/internal/ceres/evaluator.h
@@ -39,7 +39,7 @@ namespace ceres { -class CRSMatrix; +struct CRSMatrix; namespace internal {
diff --git a/internal/ceres/triplet_sparse_matrix.cc b/internal/ceres/triplet_sparse_matrix.cc index ed8677e..a09f38e 100644 --- a/internal/ceres/triplet_sparse_matrix.cc +++ b/internal/ceres/triplet_sparse_matrix.cc
@@ -71,7 +71,8 @@ } TripletSparseMatrix::TripletSparseMatrix(const TripletSparseMatrix& orig) - : num_rows_(orig.num_rows_), + : SparseMatrix(), + num_rows_(orig.num_rows_), num_cols_(orig.num_cols_), max_num_nonzeros_(orig.max_num_nonzeros_), num_nonzeros_(orig.num_nonzeros_),
diff --git a/internal/ceres/visibility.h b/internal/ceres/visibility.h index 692dd87..f29e3c6 100644 --- a/internal/ceres/visibility.h +++ b/internal/ceres/visibility.h
@@ -42,7 +42,7 @@ namespace ceres { namespace internal { -class CompressedRowBlockStructure; +struct CompressedRowBlockStructure; // Given a compressed row block structure, computes the set of // e_blocks "visible" to each f_block. If an e_block co-occurs with an
diff --git a/internal/ceres/visibility_based_preconditioner.h b/internal/ceres/visibility_based_preconditioner.h index 888c65e..3246fb8 100644 --- a/internal/ceres/visibility_based_preconditioner.h +++ b/internal/ceres/visibility_based_preconditioner.h
@@ -69,7 +69,7 @@ class BlockRandomAccessSparseMatrix; class BlockSparseMatrixBase; -class CompressedRowBlockStructure; +struct CompressedRowBlockStructure; class SchurEliminatorBase; // This class implements three preconditioners for Structure from