Skip to content

Commit

Permalink
Fix GCC 13 issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Gold856 committed Jan 21, 2025
1 parent c3908c8 commit bc19073
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 4 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
11 changes: 10 additions & 1 deletion 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__ && !defined(__clang__)
#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 @@ -162,7 +167,7 @@ struct BearingRange {
/// @}

// Alignment, see https://eigen.tuxfamily.org/dox/group__TopicStructHavingEigenMembers.html
inline constexpr static auto NeedsToAlign = (sizeof(B) % 16) == 0 || (sizeof(R) % 16) == 0;
inline constexpr static auto NeedsToAlign = true;
public:
GTSAM_MAKE_ALIGNED_OPERATOR_NEW_IF(NeedsToAlign)
};
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 bc19073

Please sign in to comment.