Skip to content
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

[3.1] Remove #pragma(s) to ignore warnings #245

Merged
merged 3 commits into from
Sep 28, 2022
Merged

Conversation

heifner
Copy link
Member

@heifner heifner commented Sep 27, 2022

  • Most of the changes are from the removal of ignoring unused-variables from chain/config.hpp
  • Removed pragma to ignore strict-aliasing from chain_plugin which is the main reason for the changes.
    • Update code to avoid strict-aliasing warning

Resolves #229

…ugin. Also removed pragma to ignore unused-variable from config.hpp. All other changes were to address the removal the ignore unused-variable.
@@ -2054,8 +2054,7 @@ BOOST_AUTO_TEST_CASE(abi_account_name_in_eosio_abi)
}
)=====";

auto abi = eosio_contract_abi(fc::json::from_string(repeat_abi).as<abi_def>());
auto is_type_exception = [](fc::assert_exception const & e) -> bool { return e.to_detail_string().find("abi.types.size") != std::string::npos; };
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe here we should report error if is_type_exception returns true, instead removing it?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is a lambda that is not used. It is copy/pasted from other tests where it is actually used.

@@ -341,7 +341,7 @@ BOOST_AUTO_TEST_CASE( any_auth ) { try {

const auto spending_priv_key = chain.get_private_key(name("alice"), "spending");
const auto spending_pub_key = spending_priv_key.get_public_key();
const auto bob_spending_priv_key = chain.get_private_key(name("bob"), "spending");
//const auto bob_spending_priv_key = chain.get_private_key(name("bob"), "spending");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why just comment out, not remove?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm NOT a fan of commented out code. But the symmetry with the others made me comment it out instead of remove. I'll go ahead and just remove it.

unittests/snapshot_tests.cpp Show resolved Hide resolved
unittests/wasm_config_tests.cpp Show resolved Hide resolved
@heifner heifner marked this pull request as ready for review September 27, 2022 23:26
@heifner heifner added the OCI Work exclusive to OCI team label Sep 27, 2022
@heifner heifner merged commit 4186f5e into release/3.1 Sep 28, 2022
@heifner heifner deleted the GH-229-warn-3.1 branch September 28, 2022 11:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants