Skip to content

Commit

Permalink
Fix warnings from GCC 13
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold856 committed Jan 14, 2025
1 parent 4cbf673 commit 4a35f5b
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
6 changes: 3 additions & 3 deletions examples/TriangulationLOSTExample.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -123,9 +123,9 @@ int main(int argc, char* argv[]) {

double rank_tol = 1e-9;
std::shared_ptr<Cal3_S2> calib = std::make_shared<Cal3_S2>();
std::chrono::nanoseconds durationDLT;
std::chrono::nanoseconds durationDLTOpt;
std::chrono::nanoseconds durationLOST;
std::chrono::nanoseconds durationDLT{};
std::chrono::nanoseconds durationDLTOpt{};
std::chrono::nanoseconds durationLOST{};

for (int i = 0; i < nrTrials; i++) {
Point2Vector noisyMeasurements =
Expand Down
9 changes: 9 additions & 0 deletions gtsam/geometry/BearingRange.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,11 @@
#endif
#include <iostream>

#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Warray-bounds"
#endif

namespace gtsam {

// Forward declaration of Bearing functor which should be of A1*A2 -> return_type
Expand Down Expand Up @@ -203,3 +208,7 @@ struct HasRange {
};

} // namespace gtsam

#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif
4 changes: 4 additions & 0 deletions gtsam/geometry/FundamentalMatrix.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,10 @@
#include <gtsam/geometry/FundamentalMatrix.h>
#include <gtsam/geometry/Point2.h>

#ifdef __GNUC__
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif

namespace gtsam {

//*************************************************************************
Expand Down

0 comments on commit 4a35f5b

Please sign in to comment.