Clean up some compiler warnings
This is a cherry pick of http://go/wvgerrit/13665 Added a few static casts and removed some unused parameters. Change-Id: I4f2d1c26580a188de429defc8d1d22757f4c6917
This commit is contained in:
@@ -355,27 +355,22 @@ CdmResponseType CdmSession::Decrypt(const CdmDecryptionParameters& params) {
|
||||
|
||||
CdmResponseType status = crypto_session_->Decrypt(params);
|
||||
|
||||
switch (status) {
|
||||
case NO_ERROR: {
|
||||
if (is_initial_decryption_) {
|
||||
policy_engine_->BeginDecryption();
|
||||
is_initial_decryption_ = false;
|
||||
}
|
||||
has_decrypted_since_last_report_ = true;
|
||||
if (!is_usage_update_needed_) {
|
||||
is_usage_update_needed_ =
|
||||
!license_parser_->provider_session_token().empty();
|
||||
}
|
||||
break;
|
||||
if (status == NO_ERROR) {
|
||||
if (is_initial_decryption_) {
|
||||
policy_engine_->BeginDecryption();
|
||||
is_initial_decryption_ = false;
|
||||
}
|
||||
case UNKNOWN_ERROR: {
|
||||
Clock clock;
|
||||
int64_t current_time = clock.GetCurrentTime();
|
||||
if (policy_engine_->IsLicenseDurationExpired(current_time) ||
|
||||
policy_engine_->IsPlaybackDurationExpired(current_time)) {
|
||||
return NEED_KEY;
|
||||
}
|
||||
break;
|
||||
has_decrypted_since_last_report_ = true;
|
||||
if (!is_usage_update_needed_) {
|
||||
is_usage_update_needed_ =
|
||||
!license_parser_->provider_session_token().empty();
|
||||
}
|
||||
} else {
|
||||
Clock clock;
|
||||
int64_t current_time = clock.GetCurrentTime();
|
||||
if (policy_engine_->IsLicenseDurationExpired(current_time) ||
|
||||
policy_engine_->IsPlaybackDurationExpired(current_time)) {
|
||||
return NEED_KEY;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1818,7 +1818,7 @@ TEST_P(DeviceFilesUsageInfoTest, Read) {
|
||||
std::vector<std::pair<CdmKeyMessage, CdmKeyResponse> > license_info;
|
||||
ASSERT_TRUE(device_files.RetrieveUsageInfo(app_id, &license_info));
|
||||
if (index >= 0) {
|
||||
EXPECT_EQ(index, license_info.size());
|
||||
EXPECT_EQ(static_cast<size_t>(index), license_info.size());
|
||||
for (size_t i = 0; i < license_info.size(); ++i) {
|
||||
bool found = false;
|
||||
for (size_t j = 0; j <= static_cast<size_t>(index); ++j) {
|
||||
@@ -1832,7 +1832,7 @@ TEST_P(DeviceFilesUsageInfoTest, Read) {
|
||||
EXPECT_TRUE(found);
|
||||
}
|
||||
} else {
|
||||
EXPECT_EQ(0, license_info.size());
|
||||
EXPECT_EQ(0u, license_info.size());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -159,7 +159,7 @@ ParseUrlTests parse_url_tests[] = {
|
||||
8888, // port
|
||||
"/", // path
|
||||
},
|
||||
{NULL} // list terminator
|
||||
{NULL, NULL, false, NULL, 0, NULL} // list terminator
|
||||
};
|
||||
|
||||
TEST_F(HttpSocketTest, ParseUrlTest) {
|
||||
|
||||
@@ -832,7 +832,7 @@ TEST_F(PolicyEngineTest, QuerySuccess_LicenseNotReceived) {
|
||||
|
||||
CdmQueryMap query_info;
|
||||
EXPECT_EQ(NO_ERROR, policy_engine_->Query(&query_info));
|
||||
EXPECT_EQ(0, query_info.size());
|
||||
EXPECT_EQ(0u, query_info.size());
|
||||
}
|
||||
|
||||
TEST_F(PolicyEngineTest, QuerySuccess_LicenseStartTimeNotSet) {
|
||||
|
||||
Reference in New Issue
Block a user