Address compilation warnings
[ Merge of http://go/wvgerrit/119523 ] Bug: 182299187 Test: compile vendor/widevine/libwvdrmengine Change-Id: I39d1b62a3237bfb9163a7e157b871f22e3fec394
This commit is contained in:
@@ -28,6 +28,7 @@
|
|||||||
#include "test_printers.h"
|
#include "test_printers.h"
|
||||||
#include "test_sleep.h"
|
#include "test_sleep.h"
|
||||||
#include "url_request.h"
|
#include "url_request.h"
|
||||||
|
#include "wv_attributes.h"
|
||||||
#include "wv_cdm_constants.h"
|
#include "wv_cdm_constants.h"
|
||||||
#include "wv_cdm_event_listener.h"
|
#include "wv_cdm_event_listener.h"
|
||||||
#include "wv_cdm_types.h"
|
#include "wv_cdm_types.h"
|
||||||
@@ -95,7 +96,8 @@ class SimpleEventListener : public wvcdm::WvCdmEventListener {
|
|||||||
}
|
}
|
||||||
void OnSessionKeysChange(const CdmSessionId&, const CdmKeyStatusMap&,
|
void OnSessionKeysChange(const CdmSessionId&, const CdmKeyStatusMap&,
|
||||||
bool) override {}
|
bool) override {}
|
||||||
void OnExpirationUpdate(const CdmSessionId&, int64_t expiry_time) override {}
|
void OnExpirationUpdate(const CdmSessionId&,
|
||||||
|
int64_t expiry_time UNUSED) override {}
|
||||||
bool renewal_needed() { return renewal_needed_; }
|
bool renewal_needed() { return renewal_needed_; }
|
||||||
void set_renewal_needed(bool renewal_needed) {
|
void set_renewal_needed(bool renewal_needed) {
|
||||||
renewal_needed_ = renewal_needed;
|
renewal_needed_ = renewal_needed;
|
||||||
|
|||||||
@@ -53,13 +53,13 @@ namespace {
|
|||||||
const int kHttpOk = 200;
|
const int kHttpOk = 200;
|
||||||
|
|
||||||
const wvcdm::CdmIdentifier kExampleIdentifier = {
|
const wvcdm::CdmIdentifier kExampleIdentifier = {
|
||||||
wvcdm::EMPTY_SPOID, "com.example", "com.example", 7};
|
wvcdm::EMPTY_SPOID, "com.example", "com.example", 7, 9};
|
||||||
|
|
||||||
const wvcdm::CdmIdentifier kAlternateCdmIdentifier1 = {
|
const wvcdm::CdmIdentifier kAlternateCdmIdentifier1 = {
|
||||||
"alternate_spoid_1", "alternate_origin_1", "com.alternate1.url", 8};
|
"alternate_spoid_1", "alternate_origin_1", "com.alternate1.url", 8, 10};
|
||||||
|
|
||||||
const wvcdm::CdmIdentifier kAlternateCdmIdentifier2 = {
|
const wvcdm::CdmIdentifier kAlternateCdmIdentifier2 = {
|
||||||
"alternate_spoid_2", "" /* empty origin */, "com.alternate2.url", 8};
|
"alternate_spoid_2", "" /* empty origin */, "com.alternate2.url", 9, 11};
|
||||||
|
|
||||||
const std::string kEmptyServiceCertificate;
|
const std::string kEmptyServiceCertificate;
|
||||||
const std::string kComma = ",";
|
const std::string kComma = ",";
|
||||||
|
|||||||
@@ -145,10 +145,10 @@ TEST_F(WvContentDecryptionModuleMetricsTest,
|
|||||||
CdmSessionId session_id;
|
CdmSessionId session_id;
|
||||||
wvcdm::CdmKeySystem key_system("com.widevine");
|
wvcdm::CdmKeySystem key_system("com.widevine");
|
||||||
CdmIdentifier identifiers[] = {kDefaultCdmIdentifier,
|
CdmIdentifier identifiers[] = {kDefaultCdmIdentifier,
|
||||||
{"foo", "bar", "baz", 7},
|
{"foo", "bar", "baz", 7, 10},
|
||||||
// Note that this has all the same parameters
|
// Note that this has all the same parameters
|
||||||
// as the one above except for the unique_id.
|
// as the one above except for the unique_id.
|
||||||
{"foo", "bar", "baz", 8}};
|
{"foo", "bar", "baz", 8, 11}};
|
||||||
const int cdm_engine_count = 3;
|
const int cdm_engine_count = 3;
|
||||||
|
|
||||||
// Force Unprovision.
|
// Force Unprovision.
|
||||||
|
|||||||
16
libwvdrmengine/cdm/util/include/wv_attributes.h
Normal file
16
libwvdrmengine/cdm/util/include/wv_attributes.h
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
// Copyright 2021 Google LLC. All rights reserved. This file and proprietary
|
||||||
|
// source code may only be used and distributed under the Widevine
|
||||||
|
// License Agreement.
|
||||||
|
|
||||||
|
#ifndef WVCDM_UTIL_WV_ATTRIBUTES_H_
|
||||||
|
#define WVCDM_UTIL_WV_ATTRIBUTES_H_
|
||||||
|
|
||||||
|
#ifndef UNUSED
|
||||||
|
# if defined(__GNUC__) || defined(__clang__)
|
||||||
|
# define UNUSED __attribute__((__unused__))
|
||||||
|
# else
|
||||||
|
# define UNUSED
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif // WVCDM_UTIL_WV_ATTRIBUTES_H_
|
||||||
@@ -913,6 +913,7 @@ TEST_F(WVDrmPluginTest, RejectsAtscProvisioningRequests) {
|
|||||||
|
|
||||||
Status status = plugin.setPropertyString(hidl_string("atscMode"),
|
Status status = plugin.setPropertyString(hidl_string("atscMode"),
|
||||||
hidl_string("enable"));
|
hidl_string("enable"));
|
||||||
|
ASSERT_EQ(Status::OK, status);
|
||||||
|
|
||||||
plugin.getProvisionRequest(
|
plugin.getProvisionRequest(
|
||||||
hidl_string(""), hidl_string(""),
|
hidl_string(""), hidl_string(""),
|
||||||
|
|||||||
Reference in New Issue
Block a user