Fix GCC 13 build issues

release/4.3a0
Gold856 2025-01-21 00:04:41 -05:00
parent 8327812d29
commit a3f2bddb66
5 changed files with 17 additions and 4 deletions

View File

@ -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 =

View File

@ -22,6 +22,10 @@
#include <gtsam/basis/Fourier.h>
#include <gtsam/nonlinear/factorTesting.h>
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic warning "-Wstringop-overread"
#pragma GCC diagnostic warning "-Warray-bounds"
#endif
using namespace std;
using namespace gtsam;

View File

@ -138,8 +138,10 @@ public:
TangentVector localCoordinates(const BearingRange& other) const {
typename traits<B>::TangentVector v1 = traits<B>::Local(bearing_, other.bearing_);
typename traits<R>::TangentVector v2 = traits<R>::Local(range_, other.range_);
// Set the first dimB elements to v1, and the next dimR elements to v2
TangentVector v;
v << v1, v2;
v.template head<dimB>() = v1;
v.template tail<dimR>() = v2;
return v;
}

View File

@ -9,6 +9,10 @@
#include <gtsam/geometry/FundamentalMatrix.h>
#include <gtsam/geometry/Point2.h>
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
namespace gtsam {
//*************************************************************************

View File

@ -14,6 +14,9 @@
#include <vector>
#if defined(__GNUC__) && !defined(__clang__)
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
#endif
using namespace std;
using namespace std::placeholders;
using namespace gtsam;