Merge "Fix compiler warnings"
This commit is contained in:
committed by
Android (Google) Code Review
commit
10275f508a
@@ -43,7 +43,7 @@ class SubLicenseKeySession : public KeySession {
|
||||
CdmCipherMode* cipher_mode,
|
||||
const std::string& srm_requirement);
|
||||
|
||||
OEMCryptoResult LoadEntitledContentKeys(const std::vector<CryptoKey>& keys) {
|
||||
OEMCryptoResult LoadEntitledContentKeys(const std::vector<CryptoKey>& /*keys*/) {
|
||||
return OEMCrypto_ERROR_INVALID_CONTEXT;
|
||||
}
|
||||
|
||||
@@ -92,4 +92,4 @@ class SubLicenseKeySession : public KeySession {
|
||||
|
||||
} // namespace wvcdm
|
||||
|
||||
#endif // WVCDM_CORE_SUBLICENSE_KEY_SESSSION_H_
|
||||
#endif // WVCDM_CORE_SUBLICENSE_KEY_SESSSION_H_
|
||||
|
||||
@@ -586,7 +586,7 @@ CdmResponseType CdmEngine::QueryStatus(SecurityLevel security_level,
|
||||
open_sessions_stream << number_of_open_sessions;
|
||||
*query_response = open_sessions_stream.str();
|
||||
} else if (query_token == QUERY_KEY_MAX_NUMBER_OF_SESSIONS) {
|
||||
size_t maximum_number_of_sessions;
|
||||
size_t maximum_number_of_sessions = 0;
|
||||
if (!crypto_session.GetMaxNumberOfSessions(&maximum_number_of_sessions)) {
|
||||
LOGW("CdmEngine::QueryStatus: GetMaxNumberOfOpenSessions failed");
|
||||
return UNKNOWN_ERROR;
|
||||
|
||||
@@ -1658,7 +1658,7 @@ bool CryptoSession::GetMaxNumberOfSessions(size_t* max) {
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t max_sessions;
|
||||
size_t max_sessions = 0;
|
||||
OEMCryptoResult status = OEMCrypto_GetMaxNumberOfSessions(
|
||||
requested_security_level_, &max_sessions);
|
||||
if (OEMCrypto_SUCCESS != status) {
|
||||
|
||||
@@ -759,10 +759,10 @@ class Adapter {
|
||||
OEMCrypto_INITIALIZED_USING_L3_COULD_NOT_OPEN_FACTORY_KEYBOX);
|
||||
return false;
|
||||
}
|
||||
uint8_t keybox[size];
|
||||
ssize_t size_read = file->Read(reinterpret_cast<char*>(keybox), size);
|
||||
std::vector<uint8_t> keybox(size);
|
||||
ssize_t size_read = file->Read(reinterpret_cast<char*>(&keybox[0]), size);
|
||||
file->Close();
|
||||
if (level1_.InstallKeybox(keybox, size) != OEMCrypto_SUCCESS) {
|
||||
if (level1_.InstallKeybox(&keybox[0], size_read) != OEMCrypto_SUCCESS) {
|
||||
LOGE("Could NOT install keybox from %s. Falling Back to L3.",
|
||||
filename.c_str());
|
||||
level1_.Terminate();
|
||||
|
||||
Reference in New Issue
Block a user