Closed Bug 1022417 Opened 6 years ago Closed 6 years ago

BluetoothHfpManager.cpp:199:419: warning: deleting object of polymorphic class type 'mozilla::dom::bluetooth::BluetoothHfpManager::GetVolumeTask' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]

Categories

(Firefox OS Graveyard :: Bluetooth, defect)

x86_64
Linux
defect
Not set

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: dholbert, Unassigned)

References

(Blocks 1 open bug)

Details

Noticed while compiling Firefox OS for a Flame device:

{
../../../gecko/dom/bluetooth/bluez/BluetoothHfpManager.cpp: In member function 'virtual MozExternalRefCountType mozilla::dom::bluetooth::BluetoothHfpManager::GetVolumeTask::Release()':
../../../gecko/dom/bluetooth/bluez/BluetoothHfpManager.cpp:199:419: warning: deleting object of polymorphic class type 'mozilla::dom::bluetooth::BluetoothHfpManager::GetVolumeTask' which has non-virtual destructor might cause undefined behaviour [-Wdelete-non-virtual-dtor]
}

This would only be an issue if something inherited from GetVolumeTask, and nothing does. We can make the compiler aware of that with MOZ_FINAL.

I'm going to add that annotation and push with blanket-r+ that ehsan has granted me on such annotations to fix this issue, per bug 829975 comment 3.
https://hg.mozilla.org/mozilla-central/rev/e3cd62c4f7d3
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.