Explicitly Pass NULL Character in ProvisioningServiceCertificateInvalidTest

Merge from Widevine repo of http://go/wvgerrit/53625

Passing the third parameter to std::string::insert() as an integer
technically makes for an ambiguous method call, as there are two
overloads that could accept these arguments. While baseline GCC and
Clang discern our intent here correctly, seawardt@ discovered that
XCode is more pedantic and requires that we pass the third parameter
as a char to disambiguate.

Test: WvCdmEnginePreProvTestUat.ProvisioningServiceCertificateInvalidTest
Test: tested as part of http://go/ag/4674759
Change-Id: I65a2506209215cd081c685faac26e08bae486d5e
This commit is contained in:
Fred Gylys-Colwell
2018-07-01 12:07:18 -07:00
parent 1d594f3140
commit 147f40a5ef

View File

@@ -516,7 +516,7 @@ TEST_F(WvCdmEnginePreProvTestUat, ProvisioningServiceCertificateValidTest) {
TEST_F(WvCdmEnginePreProvTestUat, ProvisioningServiceCertificateInvalidTest) {
std::string certificate = g_provisioning_service_certificate;
// Add four nulls to the beginning of the cert to invalidate it
certificate.insert(0, 4, 0);
certificate.insert(0, 4, '\0');
ASSERT_NE(cdm_engine_.ValidateServiceCertificate(certificate), NO_ERROR);
};