From b0f80eb4a7317906f2f17c71cf7c9fc35f6198af Mon Sep 17 00:00:00 2001 From: Colin Cross Date: Sat, 27 Oct 2018 23:33:23 -0700 Subject: [PATCH] Add SetValue for unsigned long for uint64_t google::protobuf::uint64 is changing from unsigned long long to uint64_t, which is sometimes unsigned long long and sometimes unsigned long. Add a SetValue specialization for unsigned long. Mark both the unsigned long and unsigned long long specializations as sometimes unused, they will be unused if uint64_t is the other. Bug: 117607748 Test: m checkbuild Change-Id: I8bec0be6cd7e13354cf96a7e510fe2b920aec561 --- libwvdrmengine/mediadrm/src_hidl/hidl_metrics_adapter.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libwvdrmengine/mediadrm/src_hidl/hidl_metrics_adapter.cpp b/libwvdrmengine/mediadrm/src_hidl/hidl_metrics_adapter.cpp index e1b418bc..e21252ca 100644 --- a/libwvdrmengine/mediadrm/src_hidl/hidl_metrics_adapter.cpp +++ b/libwvdrmengine/mediadrm/src_hidl/hidl_metrics_adapter.cpp @@ -48,6 +48,13 @@ void SetValue(const unsigned int& value, attribute->int64Value = value; } template<> +__attribute__((unused)) +void SetValue(const unsigned long& value, + DrmMetricGroup::Attribute* attribute) { + attribute->int64Value = value; +} +template<> +__attribute__((unused)) void SetValue(const unsigned long long& value, DrmMetricGroup::Attribute* attribute) { attribute->int64Value = value;