Loading adb/Android.mk +23 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,14 @@ ADB_COMMON_CFLAGS := \ -Wvla \ -DADB_REVISION='"$(adb_version)"' \ ADB_COMMON_linux_CFLAGS := \ -std=c++14 \ -Wexit-time-destructors \ ADB_COMMON_darwin_CFLAGS := \ -std=c++14 \ -Wexit-time-destructors \ # Define windows.h and tchar.h Unicode preprocessor symbols so that # CreateFile(), _tfopen(), etc. map to versions that take wchar_t*, breaking the # build if you accidentally pass char*. Fix by calling like: Loading Loading @@ -55,7 +63,10 @@ LIBADB_CFLAGS := \ -fvisibility=hidden \ LIBADB_linux_CFLAGS := \ -std=c++14 \ $(ADB_COMMON_linux_CFLAGS) \ LIBADB_darwin_CFLAGS := \ $(ADB_COMMON_darwin_CFLAGS) \ LIBADB_windows_CFLAGS := \ $(ADB_COMMON_windows_CFLAGS) \ Loading Loading @@ -110,6 +121,7 @@ LOCAL_MODULE_HOST_OS := darwin linux windows LOCAL_CFLAGS := $(LIBADB_CFLAGS) -DADB_HOST=1 LOCAL_CFLAGS_windows := $(LIBADB_windows_CFLAGS) LOCAL_CFLAGS_linux := $(LIBADB_linux_CFLAGS) LOCAL_CFLAGS_darwin := $(LIBADB_darwin_CFLAGS) LOCAL_SRC_FILES := \ $(LIBADB_SRC_FILES) \ adb_auth_host.cpp \ Loading Loading @@ -155,6 +167,7 @@ LOCAL_MODULE_HOST_OS := darwin linux windows LOCAL_CFLAGS := -DADB_HOST=1 $(LIBADB_CFLAGS) LOCAL_CFLAGS_windows := $(LIBADB_windows_CFLAGS) LOCAL_CFLAGS_linux := $(LIBADB_linux_CFLAGS) LOCAL_CFLAGS_darwin := $(LIBADB_darwin_CFLAGS) LOCAL_SRC_FILES := \ $(LIBADB_TEST_SRCS) \ services.cpp \ Loading Loading @@ -189,6 +202,7 @@ LOCAL_MODULE := adb_device_tracker_test LOCAL_CFLAGS := -DADB_HOST=1 $(LIBADB_CFLAGS) LOCAL_CFLAGS_windows := $(LIBADB_windows_CFLAGS) LOCAL_CFLAGS_linux := $(LIBADB_linux_CFLAGS) LOCAL_CFLAGS_darwin := $(LIBADB_darwin_CFLAGS) LOCAL_SRC_FILES := test_track_devices.cpp LOCAL_SANITIZE := $(adb_host_sanitize) LOCAL_SHARED_LIBRARIES := libbase Loading @@ -204,7 +218,6 @@ include $(CLEAR_VARS) LOCAL_LDLIBS_linux := -lrt -ldl -lpthread LOCAL_LDLIBS_darwin := -lpthread -framework CoreFoundation -framework IOKit -framework Carbon LOCAL_CFLAGS_darwin := -Wno-sizeof-pointer-memaccess -Wno-unused-parameter # Use wmain instead of main LOCAL_LDFLAGS_windows := -municode Loading @@ -230,6 +243,13 @@ LOCAL_CFLAGS += \ LOCAL_CFLAGS_windows := \ $(ADB_COMMON_windows_CFLAGS) LOCAL_CFLAGS_linux := \ $(ADB_COMMON_linux_CFLAGS) \ LOCAL_CFLAGS_darwin := \ $(ADB_COMMON_darwin_CFLAGS) \ -Wno-sizeof-pointer-memaccess -Wno-unused-parameter \ LOCAL_MODULE := adb LOCAL_MODULE_TAGS := debug LOCAL_MODULE_HOST_OS := darwin linux windows Loading Loading @@ -273,6 +293,7 @@ LOCAL_SRC_FILES := \ LOCAL_CFLAGS := \ $(ADB_COMMON_CFLAGS) \ $(ADB_COMMON_linux_CFLAGS) \ -DADB_HOST=0 \ -D_GNU_SOURCE \ -Wno-deprecated-declarations \ Loading adb/commandline.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ static int uninstall_app(TransportType t, const char* serial, int argc, const ch static int install_app_legacy(TransportType t, const char* serial, int argc, const char** argv); static int uninstall_app_legacy(TransportType t, const char* serial, int argc, const char** argv); static std::string gProductOutPath; static auto& gProductOutPath = *new std::string(); extern int gListenAll; static std::string product_file(const char *extra) { Loading adb/fdevent.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -70,8 +70,8 @@ struct PollNode { // All operations to fdevent should happen only in the main thread. // That's why we don't need a lock for fdevent. static std::unordered_map<int, PollNode> g_poll_node_map; static std::list<fdevent*> g_pending_list; static auto& g_poll_node_map = *new std::unordered_map<int, PollNode>(); static auto& g_pending_list = *new std::list<fdevent*>(); static bool main_thread_valid; static pthread_t main_thread; Loading adb/remount_service.cpp +1 −3 Original line number Diff line number Diff line Loading @@ -35,8 +35,6 @@ #include "cutils/properties.h" #include "fs_mgr.h" const std::string kFstab_Prefix = "/fstab."; // Returns the device used to mount a directory in /proc/mounts. static std::string find_proc_mount(const char* dir) { std::unique_ptr<FILE, int(*)(FILE*)> fp(setmntent("/proc/mounts", "r"), endmntent); Loading @@ -58,7 +56,7 @@ static std::string find_fstab_mount(const char* dir) { char propbuf[PROPERTY_VALUE_MAX]; property_get("ro.hardware", propbuf, ""); std::string fstab_filename = kFstab_Prefix + propbuf; std::string fstab_filename = std::string("/fstab.") + propbuf; struct fstab* fstab = fs_mgr_read_fstab(fstab_filename.c_str()); struct fstab_rec* rec = fs_mgr_get_entry_for_mount_point(fstab, dir); std::string dev = rec ? std::string(rec->blk_device) : ""; Loading adb/sysdeps_win32.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -2925,7 +2925,7 @@ size_t _escape_prefix(char* const buf, const size_t len) { } // Internal buffer to satisfy future _console_read() calls. static std::vector<char> g_console_input_buffer; static auto& g_console_input_buffer = *new std::vector<char>(); // Writes to buffer buf (of length len), returning number of bytes written or -1 on error. Never // returns zero on console closure because Win32 consoles are never 'closed' (as far as I can tell). Loading Loading @@ -3851,7 +3851,7 @@ extern "C" int wmain(int argc, wchar_t **argv) { // currently updated if putenv, setenv, unsetenv are called. Note that no // thread synchronization is done, but we're called early enough in // single-threaded startup that things work ok. static std::unordered_map<std::string, char*> g_environ_utf8; static auto& g_environ_utf8 = *new std::unordered_map<std::string, char*>(); // Make sure that shadow UTF-8 environment variables are setup. static void _ensure_env_setup() { Loading Loading
adb/Android.mk +23 −2 Original line number Diff line number Diff line Loading @@ -17,6 +17,14 @@ ADB_COMMON_CFLAGS := \ -Wvla \ -DADB_REVISION='"$(adb_version)"' \ ADB_COMMON_linux_CFLAGS := \ -std=c++14 \ -Wexit-time-destructors \ ADB_COMMON_darwin_CFLAGS := \ -std=c++14 \ -Wexit-time-destructors \ # Define windows.h and tchar.h Unicode preprocessor symbols so that # CreateFile(), _tfopen(), etc. map to versions that take wchar_t*, breaking the # build if you accidentally pass char*. Fix by calling like: Loading Loading @@ -55,7 +63,10 @@ LIBADB_CFLAGS := \ -fvisibility=hidden \ LIBADB_linux_CFLAGS := \ -std=c++14 \ $(ADB_COMMON_linux_CFLAGS) \ LIBADB_darwin_CFLAGS := \ $(ADB_COMMON_darwin_CFLAGS) \ LIBADB_windows_CFLAGS := \ $(ADB_COMMON_windows_CFLAGS) \ Loading Loading @@ -110,6 +121,7 @@ LOCAL_MODULE_HOST_OS := darwin linux windows LOCAL_CFLAGS := $(LIBADB_CFLAGS) -DADB_HOST=1 LOCAL_CFLAGS_windows := $(LIBADB_windows_CFLAGS) LOCAL_CFLAGS_linux := $(LIBADB_linux_CFLAGS) LOCAL_CFLAGS_darwin := $(LIBADB_darwin_CFLAGS) LOCAL_SRC_FILES := \ $(LIBADB_SRC_FILES) \ adb_auth_host.cpp \ Loading Loading @@ -155,6 +167,7 @@ LOCAL_MODULE_HOST_OS := darwin linux windows LOCAL_CFLAGS := -DADB_HOST=1 $(LIBADB_CFLAGS) LOCAL_CFLAGS_windows := $(LIBADB_windows_CFLAGS) LOCAL_CFLAGS_linux := $(LIBADB_linux_CFLAGS) LOCAL_CFLAGS_darwin := $(LIBADB_darwin_CFLAGS) LOCAL_SRC_FILES := \ $(LIBADB_TEST_SRCS) \ services.cpp \ Loading Loading @@ -189,6 +202,7 @@ LOCAL_MODULE := adb_device_tracker_test LOCAL_CFLAGS := -DADB_HOST=1 $(LIBADB_CFLAGS) LOCAL_CFLAGS_windows := $(LIBADB_windows_CFLAGS) LOCAL_CFLAGS_linux := $(LIBADB_linux_CFLAGS) LOCAL_CFLAGS_darwin := $(LIBADB_darwin_CFLAGS) LOCAL_SRC_FILES := test_track_devices.cpp LOCAL_SANITIZE := $(adb_host_sanitize) LOCAL_SHARED_LIBRARIES := libbase Loading @@ -204,7 +218,6 @@ include $(CLEAR_VARS) LOCAL_LDLIBS_linux := -lrt -ldl -lpthread LOCAL_LDLIBS_darwin := -lpthread -framework CoreFoundation -framework IOKit -framework Carbon LOCAL_CFLAGS_darwin := -Wno-sizeof-pointer-memaccess -Wno-unused-parameter # Use wmain instead of main LOCAL_LDFLAGS_windows := -municode Loading @@ -230,6 +243,13 @@ LOCAL_CFLAGS += \ LOCAL_CFLAGS_windows := \ $(ADB_COMMON_windows_CFLAGS) LOCAL_CFLAGS_linux := \ $(ADB_COMMON_linux_CFLAGS) \ LOCAL_CFLAGS_darwin := \ $(ADB_COMMON_darwin_CFLAGS) \ -Wno-sizeof-pointer-memaccess -Wno-unused-parameter \ LOCAL_MODULE := adb LOCAL_MODULE_TAGS := debug LOCAL_MODULE_HOST_OS := darwin linux windows Loading Loading @@ -273,6 +293,7 @@ LOCAL_SRC_FILES := \ LOCAL_CFLAGS := \ $(ADB_COMMON_CFLAGS) \ $(ADB_COMMON_linux_CFLAGS) \ -DADB_HOST=0 \ -D_GNU_SOURCE \ -Wno-deprecated-declarations \ Loading
adb/commandline.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -62,7 +62,7 @@ static int uninstall_app(TransportType t, const char* serial, int argc, const ch static int install_app_legacy(TransportType t, const char* serial, int argc, const char** argv); static int uninstall_app_legacy(TransportType t, const char* serial, int argc, const char** argv); static std::string gProductOutPath; static auto& gProductOutPath = *new std::string(); extern int gListenAll; static std::string product_file(const char *extra) { Loading
adb/fdevent.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -70,8 +70,8 @@ struct PollNode { // All operations to fdevent should happen only in the main thread. // That's why we don't need a lock for fdevent. static std::unordered_map<int, PollNode> g_poll_node_map; static std::list<fdevent*> g_pending_list; static auto& g_poll_node_map = *new std::unordered_map<int, PollNode>(); static auto& g_pending_list = *new std::list<fdevent*>(); static bool main_thread_valid; static pthread_t main_thread; Loading
adb/remount_service.cpp +1 −3 Original line number Diff line number Diff line Loading @@ -35,8 +35,6 @@ #include "cutils/properties.h" #include "fs_mgr.h" const std::string kFstab_Prefix = "/fstab."; // Returns the device used to mount a directory in /proc/mounts. static std::string find_proc_mount(const char* dir) { std::unique_ptr<FILE, int(*)(FILE*)> fp(setmntent("/proc/mounts", "r"), endmntent); Loading @@ -58,7 +56,7 @@ static std::string find_fstab_mount(const char* dir) { char propbuf[PROPERTY_VALUE_MAX]; property_get("ro.hardware", propbuf, ""); std::string fstab_filename = kFstab_Prefix + propbuf; std::string fstab_filename = std::string("/fstab.") + propbuf; struct fstab* fstab = fs_mgr_read_fstab(fstab_filename.c_str()); struct fstab_rec* rec = fs_mgr_get_entry_for_mount_point(fstab, dir); std::string dev = rec ? std::string(rec->blk_device) : ""; Loading
adb/sysdeps_win32.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -2925,7 +2925,7 @@ size_t _escape_prefix(char* const buf, const size_t len) { } // Internal buffer to satisfy future _console_read() calls. static std::vector<char> g_console_input_buffer; static auto& g_console_input_buffer = *new std::vector<char>(); // Writes to buffer buf (of length len), returning number of bytes written or -1 on error. Never // returns zero on console closure because Win32 consoles are never 'closed' (as far as I can tell). Loading Loading @@ -3851,7 +3851,7 @@ extern "C" int wmain(int argc, wchar_t **argv) { // currently updated if putenv, setenv, unsetenv are called. Note that no // thread synchronization is done, but we're called early enough in // single-threaded startup that things work ok. static std::unordered_map<std::string, char*> g_environ_utf8; static auto& g_environ_utf8 = *new std::unordered_map<std::string, char*>(); // Make sure that shadow UTF-8 environment variables are setup. static void _ensure_env_setup() { Loading