summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Hung Hsieh2017-11-28 13:03:31 -0600
committerandroid-build-merger2017-11-28 13:03:31 -0600
commitae9fb022a32ed02710b4378c989cd2981b77140a (patch)
tree4102e60e06ceda79160aea09c739030a9688072d
parentaa7cddcd714fce36869ffb7e7c14f01f7bac9611 (diff)
parent7a4422d2a534b549b7e24c43094bab2521fcf590 (diff)
downloadplatform-hardware-interfaces-ae9fb022a32ed02710b4378c989cd2981b77140a.tar.gz
platform-hardware-interfaces-ae9fb022a32ed02710b4378c989cd2981b77140a.tar.xz
platform-hardware-interfaces-ae9fb022a32ed02710b4378c989cd2981b77140a.zip
Merge "Use -Werror in hardware/interfaces/audio"
am: 7a4422d2a5 Change-Id: Ib0cf1e15856fd58f0f2ea726e3d5b94177ab33a1
-rw-r--r--audio/2.0/default/Android.mk4
-rw-r--r--audio/2.0/default/StreamIn.cpp3
-rw-r--r--audio/2.0/default/StreamOut.cpp2
-rw-r--r--audio/effect/2.0/default/Android.bp1
-rw-r--r--audio/effect/2.0/default/Effect.cpp2
5 files changed, 7 insertions, 5 deletions
diff --git a/audio/2.0/default/Android.mk b/audio/2.0/default/Android.mk
index 8dec4820..aa250778 100644
--- a/audio/2.0/default/Android.mk
+++ b/audio/2.0/default/Android.mk
@@ -30,6 +30,8 @@ LOCAL_SRC_FILES := \
30 StreamIn.cpp \ 30 StreamIn.cpp \
31 StreamOut.cpp \ 31 StreamOut.cpp \
32 32
33LOCAL_CFLAGS := -Wall -Werror
34
33LOCAL_SHARED_LIBRARIES := \ 35LOCAL_SHARED_LIBRARIES := \
34 libbase \ 36 libbase \
35 libcutils \ 37 libcutils \
@@ -65,6 +67,8 @@ LOCAL_PROPRIETARY_MODULE := true
65LOCAL_SRC_FILES := \ 67LOCAL_SRC_FILES := \
66 service.cpp 68 service.cpp
67 69
70LOCAL_CFLAGS := -Wall -Werror
71
68LOCAL_SHARED_LIBRARIES := \ 72LOCAL_SHARED_LIBRARIES := \
69 libhidlbase \ 73 libhidlbase \
70 libhidltransport \ 74 libhidltransport \
diff --git a/audio/2.0/default/StreamIn.cpp b/audio/2.0/default/StreamIn.cpp
index 9c933a92..c074f3c9 100644
--- a/audio/2.0/default/StreamIn.cpp
+++ b/audio/2.0/default/StreamIn.cpp
@@ -87,7 +87,6 @@ void ReadThread::doRead() {
87 } 87 }
88 ssize_t readResult = mStream->read(mStream, &mBuffer[0], requestedToRead); 88 ssize_t readResult = mStream->read(mStream, &mBuffer[0], requestedToRead);
89 mStatus.retval = Result::OK; 89 mStatus.retval = Result::OK;
90 uint64_t read = 0;
91 if (readResult >= 0) { 90 if (readResult >= 0) {
92 mStatus.reply.read = readResult; 91 mStatus.reply.read = readResult;
93 if (!mDataMQ->write(&mBuffer[0], readResult)) { 92 if (!mDataMQ->write(&mBuffer[0], readResult)) {
@@ -326,7 +325,7 @@ Return<void> StreamIn::prepareForReading(uint32_t frameSize,
326 ThreadInfo threadInfo = {0, 0}; 325 ThreadInfo threadInfo = {0, 0};
327 326
328 // Wrap the _hidl_cb to return an error 327 // Wrap the _hidl_cb to return an error
329 auto sendError = [this, &threadInfo, &_hidl_cb](Result result) { 328 auto sendError = [&threadInfo, &_hidl_cb](Result result) {
330 _hidl_cb(result, CommandMQ::Descriptor(), DataMQ::Descriptor(), 329 _hidl_cb(result, CommandMQ::Descriptor(), DataMQ::Descriptor(),
331 StatusMQ::Descriptor(), threadInfo); 330 StatusMQ::Descriptor(), threadInfo);
332 331
diff --git a/audio/2.0/default/StreamOut.cpp b/audio/2.0/default/StreamOut.cpp
index 22dcd0c9..0bedc74b 100644
--- a/audio/2.0/default/StreamOut.cpp
+++ b/audio/2.0/default/StreamOut.cpp
@@ -302,7 +302,7 @@ Return<void> StreamOut::prepareForWriting(uint32_t frameSize,
302 ThreadInfo threadInfo = {0, 0}; 302 ThreadInfo threadInfo = {0, 0};
303 303
304 // Wrap the _hidl_cb to return an error 304 // Wrap the _hidl_cb to return an error
305 auto sendError = [this, &threadInfo, &_hidl_cb](Result result) { 305 auto sendError = [&threadInfo, &_hidl_cb](Result result) {
306 _hidl_cb(result, CommandMQ::Descriptor(), DataMQ::Descriptor(), 306 _hidl_cb(result, CommandMQ::Descriptor(), DataMQ::Descriptor(),
307 StatusMQ::Descriptor(), threadInfo); 307 StatusMQ::Descriptor(), threadInfo);
308 308
diff --git a/audio/effect/2.0/default/Android.bp b/audio/effect/2.0/default/Android.bp
index 79bb8b0d..e1072b46 100644
--- a/audio/effect/2.0/default/Android.bp
+++ b/audio/effect/2.0/default/Android.bp
@@ -1,5 +1,6 @@
1cc_library_shared { 1cc_library_shared {
2 name: "android.hardware.audio.effect@2.0-impl", 2 name: "android.hardware.audio.effect@2.0-impl",
3 defaults: ["hidl_defaults"],
3 vendor: true, 4 vendor: true,
4 relative_install_path: "hw", 5 relative_install_path: "hw",
5 srcs: [ 6 srcs: [
diff --git a/audio/effect/2.0/default/Effect.cpp b/audio/effect/2.0/default/Effect.cpp
index 2d36604d..184607e5 100644
--- a/audio/effect/2.0/default/Effect.cpp
+++ b/audio/effect/2.0/default/Effect.cpp
@@ -610,10 +610,8 @@ Return<void> Effect::getSupportedAuxChannelsConfigs(
610} 610}
611 611
612Return<void> Effect::getAuxChannelsConfig(getAuxChannelsConfig_cb _hidl_cb) { 612Return<void> Effect::getAuxChannelsConfig(getAuxChannelsConfig_cb _hidl_cb) {
613 uint32_t halCmd = EFFECT_FEATURE_AUX_CHANNELS;
614 uint32_t halResult[alignedSizeIn<uint32_t>(sizeof(uint32_t) + sizeof(channel_config_t))]; 613 uint32_t halResult[alignedSizeIn<uint32_t>(sizeof(uint32_t) + sizeof(channel_config_t))];
615 memset(halResult, 0, sizeof(halResult)); 614 memset(halResult, 0, sizeof(halResult));
616 uint32_t halResultSize = 0;
617 EffectAuxChannelsConfig result; 615 EffectAuxChannelsConfig result;
618 Result retval = getCurrentConfigImpl( 616 Result retval = getCurrentConfigImpl(
619 EFFECT_FEATURE_AUX_CHANNELS, 617 EFFECT_FEATURE_AUX_CHANNELS,