Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 8b47d316 authored by Pirama Arumuga Nainar's avatar Pirama Arumuga Nainar
Browse files

Fix exit-time-destructor warning

By initializing the global handle_list on the heap.

Test: Run Clang-built adb_test.exe under wine
Change-Id: I2326011b7e44c6d0cb4721d4b68fde7188b87c38
parent 98caf20a
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -75,7 +75,7 @@ struct usb_handle : public ::usb_handle {
static const GUID usb_class_id = ANDROID_USB_CLASS_ID;
static const GUID usb_class_id = ANDROID_USB_CLASS_ID;


/// List of opened usb handles
/// List of opened usb handles
static std::vector<usb_handle*> handle_list;
static std::vector<usb_handle*>& handle_list = *new std::vector<usb_handle*>();


/// Locker for the list of opened usb handles
/// Locker for the list of opened usb handles
static std::mutex& usb_lock = *new std::mutex();
static std::mutex& usb_lock = *new std::mutex();