Use -Werror in hardware/interfaces
authorChih-Hung Hsieh <chh@google.com>
Fri, 29 Sep 2017 22:15:48 +0000 (15:15 -0700)
committerChih-Hung Hsieh <chh@google.com>
Wed, 4 Oct 2017 18:16:31 +0000 (11:16 -0700)
* Remove unused local variables.

Bug: 66996870
Test: build with WITH_TIDY=1
Change-Id: I48dbbf670cc9eeff2391983788983420f8547cc9

12 files changed:
audio/common/2.0/default/Android.bp
drm/1.0/vts/functional/Android.bp
drm/1.0/vts/functional/drm_hal_clearkey_test.cpp
drm/1.0/vts/functional/drm_hal_vendor_test.cpp
minijail/Android.bp
nfc/1.0/default/Android.bp
radio/1.0/vts/functional/Android.bp
tests/hash/1.0/default/Android.bp
tests/libhwbinder/1.0/default/Android.bp
tests/libhwbinder/aidl/Android.bp
tests/msgq/1.0/default/Android.bp
wifi/1.0/vts/functional/Android.bp

index 0486a5c72329c744813a5f8d7d65d6dbf9aff250..7fab220fcf681f4b5e15da1f5cff640f2d906825 100644 (file)
@@ -15,6 +15,7 @@
 
 cc_library_shared {
     name: "android.hardware.audio.common@2.0-util",
+    defaults: ["hidl_defaults"],
     vendor_available: true,
     srcs: [
         "EffectMap.cpp",
index b45ce848df58f32df2b37786fedfeb8c815e01d1..18aebee4a9a532e2d77be3e1df0664f40554a42b 100644 (file)
@@ -16,6 +16,7 @@
 
 cc_test {
     name: "VtsHalDrmV1_0TargetTest",
+    defaults: ["VtsHalTargetTestDefaults"],
     srcs: [
         "drm_hal_clearkey_test.cpp",
         "drm_hal_vendor_test.cpp",
index 04f265866cb78e0de6fc1f4dafa2143942ed9c24..194b2a7bbac6f0fa1cd948936eba787976933c11 100644 (file)
@@ -1064,8 +1064,6 @@ void DrmHalClearkeyDecryptTest::aes_cbc_decrypt(uint8_t* dest, uint8_t* src,
     AES_set_encrypt_key(&key[0], 128, &decryptionKey);
 
     size_t offset = 0;
-    size_t num = 0;
-    size_t ecount_buf = 0;
     for (size_t i = 0; i < subSamples.size(); i++) {
         memcpy(dest + offset, src + offset, subSamples[i].numBytesOfClearData);
         offset += subSamples[i].numBytesOfClearData;
@@ -1106,7 +1104,6 @@ TEST_F(DrmHalClearkeyDecryptTest, ClearSegmentTest) {
     Status status = cryptoPlugin->setMediaDrmSession(sessionId);
     EXPECT_EQ(Status::OK, status);
 
-    const bool kNotSecure = false;
     uint32_t byteCount = decrypt(Mode::UNENCRYPTED, &iv[0], subSamples,
             noPattern, Status::OK);
     EXPECT_EQ(kByteCount, byteCount);
@@ -1133,7 +1130,6 @@ TEST_F(DrmHalClearkeyDecryptTest, EncryptedAesCtrSegmentTest) {
     Status status = cryptoPlugin->setMediaDrmSession(sessionId);
     EXPECT_EQ(Status::OK, status);
 
-    const bool kNotSecure = false;
     uint32_t byteCount = decrypt(Mode::AES_CTR, &iv[0], subSamples,
             noPattern, Status::OK);
     EXPECT_EQ(kClearBytes + kEncryptedBytes, byteCount);
@@ -1154,7 +1150,6 @@ TEST_F(DrmHalClearkeyDecryptTest, EncryptedAesCtrSegmentTestNoKeys) {
     Status status = cryptoPlugin->setMediaDrmSession(sessionId);
     EXPECT_EQ(Status::OK, status);
 
-    const bool kNotSecure = false;
     uint32_t byteCount = decrypt(Mode::AES_CTR, &iv[0], subSamples,
             noPattern, Status::ERROR_DRM_NO_LICENSE);
     EXPECT_EQ(0u, byteCount);
index 33fb6fbac3f7c5e706917669108d3a0920519bb2..389ffec70616811980f9c51daa9677a9a013569f 100644 (file)
@@ -1407,8 +1407,6 @@ void DrmHalVendorDecryptTest::aes_cbc_decrypt(uint8_t* dest, uint8_t* src,
     AES_set_encrypt_key(&key[0], 128, &decryptionKey);
 
     size_t offset = 0;
-    size_t num = 0;
-    size_t ecount_buf = 0;
     for (size_t i = 0; i < subSamples.size(); i++) {
         const SubSample& subSample = subSamples[i];
 
index b95f0298bc7940282cad0fdfccd5d1a5c4797e32..c01a12bf8391d2c4634b31ed4662deee550c274d 100644 (file)
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "libhwminijail",
+    defaults: ["hidl_defaults"],
     vendor: true,
     export_include_dirs: ["include"],
 
index d7f720308ea0533deca8217f5710f4a465a71c9c..3b53d169263bc68998e4f7ad1b859a8f28af7a38 100644 (file)
@@ -19,6 +19,7 @@ cc_library_shared {
 
 cc_binary {
     name: "android.hardware.nfc@1.0-service",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     proprietary: true,
     init_rc: ["android.hardware.nfc@1.0-service.rc"],
index 82a8a7292a10641589eedae088524140cbc15614..61136ae644a0ffef5225d5a4e5d5c842314196a5 100644 (file)
@@ -50,6 +50,7 @@ cc_test {
 
 cc_library_static {
     name: "RadioVtsTestUtilBase",
+    defaults: ["hidl_defaults"],
     srcs : [
         "vts_test_util.cpp"
     ],
index ae44876c45bf468196f8c26a3a75a56abaf42585..67f90977d6f67c0cb6133261aaeb5ee48e9dbeed 100644 (file)
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "android.hardware.tests.hash@1.0-impl",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     srcs: [
         "Hash.cpp",
index f1f99a63db2633a80a6a16fed51ce7d3f2d8fbd5..3d18720d83f1b9be1211e3e32554f5f97d02128b 100644 (file)
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "android.hardware.tests.libhwbinder@1.0-impl",
+    defaults: ["hidl_defaults"],
     relative_install_path: "hw",
     srcs: [
         "Benchmark.cpp",
index a662085bf550c42bf0376824af73d81703b09506..6d497049b3648cba6420c341a7100ea712726b10 100644 (file)
@@ -1,5 +1,6 @@
 cc_library_shared {
     name: "android.hardware.tests.libbinder",
+    defaults: ["hidl_defaults"],
 
     srcs: ["android/tests/binder/IBenchmark.aidl"],
 
index eb25ac2e197fe25942b3dc5feaf1ec167429ef91..be4fe945433aedbe4a56d88419413e79ebc4d728 100644 (file)
@@ -35,6 +35,7 @@ cc_library_shared {
 
 cc_test {
     name: "android.hardware.tests.msgq@1.0-service-benchmark",
+    defaults: ["hidl_defaults"],
     srcs: ["mq_benchmark_service.cpp"],
     gtest: false,
 
@@ -51,6 +52,7 @@ cc_test {
 
 cc_test {
     name: "android.hardware.tests.msgq@1.0-service-test",
+    defaults: ["hidl_defaults"],
     srcs: ["mq_test_service.cpp"],
     gtest: false,
 
index e164cdf4d6f9f56edc597be46aeefca6e0107dd6..10f1987a06634b9073d5fdebeb4dfe83369b8d58 100644 (file)
@@ -16,6 +16,7 @@
 
 cc_library_static {
     name: "VtsHalWifiV1_0TargetTestUtil",
+    defaults: ["hidl_defaults"],
     srcs: [
 
         "wifi_hidl_call_util_selftest.cpp",