Fix gpr_log compiler warning about string literals, which breaks the build

pull/24938/head
AJ Heller 4 years ago
parent 8d9b37362c
commit 51fe6bc4aa
  1. 2
      test/core/client_channel/resolvers/dns_resolver_cooldown_test.cc
  2. 4
      test/core/client_channel/resolvers/dns_resolver_test.cc

@ -285,7 +285,7 @@ static void start_test_under_work_serializer(void* arg) {
gpr_log(GPR_DEBUG, "test: '%s' should be valid for '%s'", res_cb_arg->uri_str, gpr_log(GPR_DEBUG, "test: '%s' should be valid for '%s'", res_cb_arg->uri_str,
factory->scheme()); factory->scheme());
if (!uri.ok()) { if (!uri.ok()) {
gpr_log(GPR_ERROR, uri.status().ToString().c_str()); gpr_log(GPR_ERROR, "%s", uri.status().ToString().c_str());
GPR_ASSERT(uri.ok()); GPR_ASSERT(uri.ok());
} }
grpc_core::ResolverArgs args; grpc_core::ResolverArgs args;

@ -42,7 +42,7 @@ static void test_succeeds(grpc_core::ResolverFactory* factory,
grpc_core::ExecCtx exec_ctx; grpc_core::ExecCtx exec_ctx;
absl::StatusOr<grpc_core::URI> uri = grpc_core::URI::Parse(string); absl::StatusOr<grpc_core::URI> uri = grpc_core::URI::Parse(string);
if (!uri.ok()) { if (!uri.ok()) {
gpr_log(GPR_ERROR, uri.status().ToString().c_str()); gpr_log(GPR_ERROR, "%s", uri.status().ToString().c_str());
GPR_ASSERT(uri.ok()); GPR_ASSERT(uri.ok());
} }
grpc_core::ResolverArgs args; grpc_core::ResolverArgs args;
@ -61,7 +61,7 @@ static void test_fails(grpc_core::ResolverFactory* factory,
grpc_core::ExecCtx exec_ctx; grpc_core::ExecCtx exec_ctx;
absl::StatusOr<grpc_core::URI> uri = grpc_core::URI::Parse(string); absl::StatusOr<grpc_core::URI> uri = grpc_core::URI::Parse(string);
if (!uri.ok()) { if (!uri.ok()) {
gpr_log(GPR_ERROR, uri.status().ToString().c_str()); gpr_log(GPR_ERROR, "%s", uri.status().ToString().c_str());
GPR_ASSERT(uri.ok()); GPR_ASSERT(uri.ok());
} }
grpc_core::ResolverArgs args; grpc_core::ResolverArgs args;

Loading…
Cancel
Save