summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChih-Hung Hsieh2017-11-28 13:18:04 -0600
committerandroid-build-merger2017-11-28 13:18:04 -0600
commitdbd7e5f031e159cafdb5f8e82d985cf236b6fa60 (patch)
tree01e6e6f54335c07cad28fc7cca3cdcc3d0605ab3
parentcf7047143484e9a7a8219365e3ba09853c057a94 (diff)
parent5d8244ee3f0e36178fb72b02055c24807d3e3247 (diff)
downloadplatform-hardware-interfaces-dbd7e5f031e159cafdb5f8e82d985cf236b6fa60.tar.gz
platform-hardware-interfaces-dbd7e5f031e159cafdb5f8e82d985cf236b6fa60.tar.xz
platform-hardware-interfaces-dbd7e5f031e159cafdb5f8e82d985cf236b6fa60.zip
Merge "Use -Werror in hardware/interfaces/audio" am: 7a4422d2a5 am: ae9fb022a3
am: 5d8244ee3f Change-Id: I0826ee82634360949a94b3ca51011fe52f9f8079
-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,