From 408d540eda30b557ecc0ab07ac3d39b617b37c4c Mon Sep 17 00:00:00 2001 From: Avi Kivity Date: Wed, 5 Jul 2017 18:32:31 +0300 Subject: [PATCH] Fix cql_test_env::create_keyspace() in debug mode with gcc 7 gcc 7 complains about a use after scope bug in create_keyspace. It looks like a false positive to me. --- tests/cql_test_env.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/cql_test_env.cc b/tests/cql_test_env.cc index a172fafd9d9b..a1013e144184 100644 --- a/tests/cql_test_env.cc +++ b/tests/cql_test_env.cc @@ -243,7 +243,7 @@ class single_node_cql_env : public cql_test_env { } future<> create_keyspace(sstring name) { - auto query = sprint("create keyspace %s with replication = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor' : 1 };", name); + auto query = sstring(sprint("create keyspace %s with replication = { 'class' : 'org.apache.cassandra.locator.SimpleStrategy', 'replication_factor' : 1 };", name)); return execute_cql(query).discard_result(); }