From bc9c17b5d92650f9d480531966aa751783c56a76 Mon Sep 17 00:00:00 2001 From: devath1x Date: Tue, 10 Sep 2024 03:09:48 +0000 Subject: [PATCH] Fixing uninitialized variable coverity issue has_died_ is not initialized in the constructor nor in any functions that it calls Initialized has_died_ in constructor Tested: BT on/off --> 10 times Connect phone, play music -> 10 times HFP call --> 10 times File transfer -> working CtsBluetoothTestCases -> passing Tracked-On: OAM-123193 Signed-off-by: devath1x Signed-off-by: Gowtham Anandha Babu --- bluetooth/bluetooth_hci.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bluetooth/bluetooth_hci.cc b/bluetooth/bluetooth_hci.cc index f789310..cc1abad 100644 --- a/bluetooth/bluetooth_hci.cc +++ b/bluetooth/bluetooth_hci.cc @@ -33,7 +33,7 @@ static const uint8_t HCI_DATA_TYPE_SCO = 3; class BluetoothDeathRecipient : public hidl_death_recipient { public: - BluetoothDeathRecipient(const sp hci) : mHci(hci) {} + BluetoothDeathRecipient(const sp hci) : mHci(hci), has_died_(false) {} virtual void serviceDied( uint64_t /*cookie*/,