Code clean for audioflinger
Cleaning compile warnings:
1. For "variable 'XX' set but not used":
Remove the variables which are obviously not used;
Add "[[maybe_unused]]" to variable declaration of the ones
which are potentially used.
2. For "unused parameter 'XX'":
Add "[[maybe_unused]]" to the unused function parameters.
Test: mmm frameworks/av/services/audioflinger, presubmit check.
Change-Id: I6bd6fa9a57de93f5387e1ad76342f0a0b0ac28ed
Signed-off-by: Jing Mike <jingyangliu@eswincomputing.com>
diff --git a/services/audioflinger/AudioFlinger.cpp b/services/audioflinger/AudioFlinger.cpp
index c05aac1..ba7c6b6 100644
--- a/services/audioflinger/AudioFlinger.cpp
+++ b/services/audioflinger/AudioFlinger.cpp
@@ -4585,12 +4585,9 @@
// ----------------------------------------------------------------------------
status_t AudioFlinger::onTransactWrapper(TransactionCode code,
- const Parcel& data,
- uint32_t flags,
+ [[maybe_unused]] const Parcel& data,
+ [[maybe_unused]] uint32_t flags,
const std::function<status_t()>& delegate) {
- (void) data;
- (void) flags;
-
// make sure transactions reserved to AudioPolicyManager do not come from other processes
switch (code) {
case TransactionCode::SET_STREAM_VOLUME: