AudioFlinger: Add clang tidy checks on build
First pass just enables warnings.
Test: compiles
Bug: 252907478
Merged-In: I3d0622ab908b85adb1913d8482d55e1950fdccc0
Change-Id: I3d0622ab908b85adb1913d8482d55e1950fdccc0
diff --git a/services/audioflinger/DeviceEffectManager.h b/services/audioflinger/DeviceEffectManager.h
index 7602f12..395781d 100644
--- a/services/audioflinger/DeviceEffectManager.h
+++ b/services/audioflinger/DeviceEffectManager.h
@@ -45,11 +45,11 @@
int32_t sessionId, int32_t deviceId,
sp<EffectHalInterface> *effect);
status_t addEffectToHal(audio_port_handle_t deviceId, audio_module_handle_t hwModuleId,
- sp<EffectHalInterface> effect) {
+ const sp<EffectHalInterface>& effect) {
return mAudioFlinger.addEffectToHal(deviceId, hwModuleId, effect);
};
status_t removeEffectFromHal(audio_port_handle_t deviceId, audio_module_handle_t hwModuleId,
- sp<EffectHalInterface> effect) {
+ const sp<EffectHalInterface>& effect) {
return mAudioFlinger.removeEffectFromHal(deviceId, hwModuleId, effect);
};
@@ -74,7 +74,7 @@
class DeviceEffectManagerCallback : public EffectCallbackInterface {
public:
- DeviceEffectManagerCallback(DeviceEffectManager& manager)
+ explicit DeviceEffectManagerCallback(DeviceEffectManager& manager)
: mManager(manager) {}
status_t createEffectHal(const effect_uuid_t *pEffectUuid,
@@ -105,10 +105,10 @@
size_t frameCount() const override { return 0; }
uint32_t latency() const override { return 0; }
- status_t addEffectToHal(sp<EffectHalInterface> effect __unused) override {
+ status_t addEffectToHal(const sp<EffectHalInterface>& /* effect */) override {
return NO_ERROR;
}
- status_t removeEffectFromHal(sp<EffectHalInterface> effect __unused) override {
+ status_t removeEffectFromHal(const sp<EffectHalInterface>& /* effect */) override {
return NO_ERROR;
}
@@ -133,11 +133,11 @@
int newEffectId() { return mManager.audioFlinger().nextUniqueId(AUDIO_UNIQUE_ID_USE_EFFECT); }
status_t addEffectToHal(audio_port_handle_t deviceId,
- audio_module_handle_t hwModuleId, sp<EffectHalInterface> effect) {
+ audio_module_handle_t hwModuleId, const sp<EffectHalInterface>& effect) {
return mManager.addEffectToHal(deviceId, hwModuleId, effect);
}
status_t removeEffectFromHal(audio_port_handle_t deviceId,
- audio_module_handle_t hwModuleId, sp<EffectHalInterface> effect) {
+ audio_module_handle_t hwModuleId, const sp<EffectHalInterface>& effect) {
return mManager.removeEffectFromHal(deviceId, hwModuleId, effect);
}
private: