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
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions tests/src/integration/integration.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
#endif
try {
// Create and start the CCM cluster (if not already created)
ccm_ = new CCM::Bridge(
Expand Down Expand Up @@ -190,6 +194,9 @@ void Integration::SetUp() {
// Issue creating the CCM bridge instance (force failure)
FAIL() << be.what();
}
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
# pragma GCC diagnostic pop
#endif
}
}

Expand Down
7 changes: 7 additions & 0 deletions tests/src/integration/objects/cluster.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -216,11 +216,18 @@ class Cluster : public Object<CassCluster, cass_cluster_free> {
* otherwise (default: true)
* @return Cluster object
*/
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
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.


/**
* Sets the number of I/O threads. This is the number of threads that will
Expand Down
7 changes: 7 additions & 0 deletions tests/src/integration/objects/retry_policy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,12 @@

using namespace test::driver;

#if defined(__GNUC__) || defined(__INTEL_COMPILER)
# pragma GCC diagnostic push
# pragma GCC diagnostic ignored "-Wdeprecated-declarations"
#endif
DowngradingConsistencyRetryPolicy::DowngradingConsistencyRetryPolicy()
: RetryPolicy(cass_retry_policy_downgrading_consistency_new()) {}
#if defined(__GNUC__) || defined(__INTEL_COMPILER)
# pragma GCC diagnostic pop
#endif