-
Notifications
You must be signed in to change notification settings - Fork 973
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
April 2024 warning police #4297
Conversation
src/herder/test/HerderTests.cpp
Outdated
@@ -5862,7 +5862,7 @@ TEST_CASE("SCP message capture from previous ledger", "[herder]") | |||
// Initialize simulation | |||
auto networkID = sha256(getTestConfig().NETWORK_PASSPHRASE); | |||
auto simulation = std::make_shared<Simulation>( | |||
Simulation::OVER_LOOPBACK, networkID, [version](int i) { | |||
Simulation::OVER_LOOPBACK, networkID, [](int i) { |
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.
Unless Microsoft fixed their compiler this unnecessary version
capture is necessary due to an MSVC bug (see #4194, and specifically this comment)
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.
Ok, fixed (crudely: made it non-constexpr and captured it)
If this change resolves all of the warnings, I also wonder what your thoughts are on setting |
It doesn't. there are warnings in several submodules and depending on the compiler and compiler version you use you'll get a different set. In general while I appreciate the moral goal of |
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! It looks like we're not compiling though in CI, I think you might have removed a few too many includes.
Makes sense, thanks! |
This is weird! I hate to be the "it works on my machine" guy but .. it works on my machine! I will try to figure out the cause. |
src/herder/test/HerderTests.cpp
Outdated
|
||
// Initialize simulation | ||
auto networkID = sha256(getTestConfig().NETWORK_PASSPHRASE); | ||
auto simulation = std::make_shared<Simulation>( | ||
Simulation::OVER_LOOPBACK, networkID, [](int i) { | ||
Simulation::OVER_LOOPBACK, networkID, [version](int i) { | ||
auto cfg = getTestConfig(i, Config::TESTDB_ON_DISK_SQLITE); | ||
cfg.TESTING_UPGRADE_LEDGER_PROTOCOL_VERSION = version; |
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.
is this needed at all? I think this test should just use the most recent version for testing, which is the default, if we don't override TESTING_UPGRADE_LEDGER_PROTOCOL_VERSION
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.
I have no idea why the test is hard-wired to a single version. possibly copypasta. it works fine without that line and in fact without the ConfigGen argument at all.
9347c5b
to
142f833
Compare
142f833
to
080ee6d
Compare
It was too embarrassingly silly to mention here. Anyway, fixed. |
r+ efb9d1e |
Fix some warnings that cropped up from (a) recent work in overlay and buckets and (b) recent upgrades to my copy of clangd which now has IWYU turned on by default, and I figured .. why not start listening to it and cleaning things up incrementally?