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

CPP-956 Fix gcc compiler warnings for integration tests #527

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

absurdfarce
Copy link
Collaborator

No description provided.

Cluster& with_hostname_resolution(bool enable = true) {
EXPECT_EQ(CASS_OK, cass_cluster_set_use_hostname_resolution(
get(), (enable == true ? cass_true : cass_false)));
return *this;
}
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
# pragma GCC diagnostic pop
#endif
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

We might be able to do away with this function all together. It's only used in some of the DSE tests and those tests appear to pass without them, at least against DSE 6.7.7. The code above seems less intrusive than potentially changing how a test behaves so I decided to start with this... but I could be convinced otherwise.

@absurdfarce
Copy link
Collaborator Author

"make" after "cmake -DCASS_BUILD_INTEGRATION_TESTS=On .." completes with no warnings after this change

@absurdfarce absurdfarce requested a review from mpenick March 29, 2022 18:43
@@ -148,6 +148,10 @@ void Integration::SetUp() {
data_center_nodes.push_back(number_dc2_nodes_);

if (is_ccm_requested_) {
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcatch-value"
Copy link
Contributor

@mpenick mpenick Apr 28, 2022

Choose a reason for hiding this comment

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

Can the code just be fixed to resolve the warning? I think CCM::BridgeException be --> CCM::BridgeException& be will fix.

*/
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wdeprecated-declarations"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think it's fine to have deprecation warnings.

Copy link
Contributor

@mpenick mpenick left a comment

Choose a reason for hiding this comment

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

I don't think we should be using pragma's for this...It's kind of dangerous.

  • The first warning is valid and should be fixed.
  • The other two are for our deprecated functions, the fix is to eventually remove those functions and we should see those warnings until they're removed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants