From 8b47d316d253d05f92cf853d5b44cc28666848fe Mon Sep 17 00:00:00 2001 From: Pirama Arumuga Nainar Date: Fri, 1 Jun 2018 11:30:15 -0700 Subject: [PATCH] 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 --- adb/client/usb_windows.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adb/client/usb_windows.cpp b/adb/client/usb_windows.cpp index 9751ebf79..f529e8f32 100644 --- a/adb/client/usb_windows.cpp +++ b/adb/client/usb_windows.cpp @@ -75,7 +75,7 @@ struct usb_handle : public ::usb_handle { static const GUID usb_class_id = ANDROID_USB_CLASS_ID; /// List of opened usb handles -static std::vector handle_list; +static std::vector& handle_list = *new std::vector(); /// Locker for the list of opened usb handles static std::mutex& usb_lock = *new std::mutex();