Enable clang-tidy in oboeservice.
Warnings and errors generated by clang-tidy are eliminated by this CL.
Bug: 186572209
Test: make
Test: atest AAudioTests
Change-Id: I3296193bac18fee499f39314ac32a5750a385855
diff --git a/services/oboeservice/AAudioServiceEndpointShared.cpp b/services/oboeservice/AAudioServiceEndpointShared.cpp
index 02202d8..1dd0c3a 100644
--- a/services/oboeservice/AAudioServiceEndpointShared.cpp
+++ b/services/oboeservice/AAudioServiceEndpointShared.cpp
@@ -103,8 +103,7 @@
// Prevent the stream from being deleted while being used.
// This is just for extra safety. It is probably not needed because
// this callback should be joined before the stream is closed.
- AAudioServiceEndpointShared *endpointPtr =
- static_cast<AAudioServiceEndpointShared *>(arg);
+ auto endpointPtr = static_cast<AAudioServiceEndpointShared *>(arg);
android::sp<AAudioServiceEndpointShared> endpoint(endpointPtr);
// Balance the incStrong() in startSharingThread_l().
endpoint->decStrong(nullptr);
@@ -140,7 +139,7 @@
aaudio_result_t aaudio::AAudioServiceEndpointShared::stopSharingThread() {
mCallbackEnabled.store(false);
- return getStreamInternal()->joinThread(NULL);
+ return getStreamInternal()->joinThread(nullptr);
}
aaudio_result_t AAudioServiceEndpointShared::startStream(
@@ -180,8 +179,8 @@
return result;
}
-aaudio_result_t AAudioServiceEndpointShared::stopStream(sp<AAudioServiceStreamBase> sharedStream,
- audio_port_handle_t clientHandle) {
+aaudio_result_t AAudioServiceEndpointShared::stopStream(
+ sp<AAudioServiceStreamBase> /*sharedStream*/, audio_port_handle_t clientHandle) {
// Ignore result.
(void) getStreamInternal()->stopClient(clientHandle);