[cleanups] Silence a -Wformat compiler warning (#33484)

New versions of Clang (and GCC) warn about this

grpc_authorization_policy_provider.cc:124:17: error: format specifies
type 'int' but the argument has type 'absl::StatusCode'
[-Werror,-Wformat]
124 | "authorization policy reload status. code=%d error_details=%s",
      |                                                           ~~
125 | status.code(), std::string(status.message()).c_str());
pull/33496/head
Benjamin Kramer 1 year ago committed by GitHub
parent 123da4a866
commit 834683f08d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 3
      src/core/lib/security/authorization/grpc_authorization_policy_provider.cc

@ -121,7 +121,8 @@ FileWatcherAuthorizationPolicyProvider::FileWatcherAuthorizationPolicyProvider(
if (GRPC_TRACE_FLAG_ENABLED(grpc_authz_trace) && !status.ok()) {
gpr_log(GPR_ERROR,
"authorization policy reload status. code=%d error_details=%s",
status.code(), std::string(status.message()).c_str());
static_cast<int>(status.code()),
std::string(status.message()).c_str());
}
}
};

Loading…
Cancel
Save