From 5bdfd37f871a0de219849f92113a8d45db49448a Mon Sep 17 00:00:00 2001 From: Carlos O'Ryan Date: Fri, 29 Mar 2024 19:30:07 +0000 Subject: [PATCH] fix(common): `clang-cl` needs a `const_cast<>` --- google/cloud/internal/win32/parse_service_account_p12_file.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/google/cloud/internal/win32/parse_service_account_p12_file.cc b/google/cloud/internal/win32/parse_service_account_p12_file.cc index e1a1103a40cca..c5fb07699ec2e 100644 --- a/google/cloud/internal/win32/parse_service_account_p12_file.cc +++ b/google/cloud/internal/win32/parse_service_account_p12_file.cc @@ -215,7 +215,7 @@ StatusOr> EncodeRsaPkcs8PrivateKey( absl::Span pkcs1_encoded, std::string const& source) { CRYPT_PRIVATE_KEY_INFO private_key_info; private_key_info.Version = 0; - private_key_info.Algorithm.pszObjId = szOID_RSA_RSA; + private_key_info.Algorithm.pszObjId = const_cast(szOID_RSA_RSA); private_key_info.Algorithm.Parameters.cbData = 0; private_key_info.Algorithm.Parameters.pbData = nullptr; private_key_info.PrivateKey.cbData = static_cast(pkcs1_encoded.size());