-
Notifications
You must be signed in to change notification settings - Fork 792
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix GCC 13 warnings #1978
Fix GCC 13 warnings #1978
Conversation
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
@@ -9,6 +9,10 @@ | |||
#include <gtsam/geometry/FundamentalMatrix.h> | |||
#include <gtsam/geometry/Point2.h> | |||
|
|||
#ifdef __GNUC__ | |||
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably the simplest solution for now, but it is nice that in Eigen 3.4 the SVD implementations have an info()
method that can be used to check it and fix the uninitialized warning.
Eigen::JacobiSVD<Matrix3> svd(F, Eigen::ComputeFullU | Eigen::ComputeFullV);
if (svd.info() != Eigen::ComputationInfo::Success) {
throw std::runtime_error("FundamentalMatrix::FundamentalMatrix unsuccessful svd computation");
}
Yeah my take is that these warnings seem spurious (in most cases -- at least those we found in this MR, with the exception of examples/TriangulationLOSTExample.cpp), and we should build with |
Globally? That seems too dangerous. I’m already queasy with a file-level exception :-) After you remove the workflow edits, however, I’m ok with the PR as is. We should then open an issue to look more closely as to what’s happening. |
Your proposed edit is way better - in that it kills the pragmas. |
Getting this set of errors when building
The stringop-overread warning is new. I really do think we should use |
4591e01
to
1f89665
Compare
Quick question: are you only seeing this on GCC? |
I haven’t tried Clang, only GCC. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
I added more pragmas to some of the tests so they don't fail when building. I set them up to still print out warnings though so we don't forget. |
OK. ready to merge? |
Building all the tests and examples without Boost works on my machine, so I'm ready when you are. |
Merged! Many thanks!!! |
Fixes #1967 and fixes #1981.