Merge "Small test fixes."
diff --git a/adb/Android.mk b/adb/Android.mk
index 819bad1..efdff5d 100644
--- a/adb/Android.mk
+++ b/adb/Android.mk
@@ -8,14 +8,12 @@
adb_host_sanitize :=
adb_target_sanitize :=
-adb_version := $(shell git -C $(LOCAL_PATH) rev-parse --short=12 HEAD 2>/dev/null)-android
-
ADB_COMMON_CFLAGS := \
-Wall -Wextra -Werror \
-Wno-unused-parameter \
-Wno-missing-field-initializers \
-Wvla \
- -DADB_REVISION='"$(adb_version)"' \
+ -DADB_REVISION=\"$(BUILD_NUMBER_FROM_FILE)\" \
ADB_COMMON_posix_CFLAGS := \
-Wexit-time-destructors \
diff --git a/adb/client/usb_libusb.cpp b/adb/client/usb_libusb.cpp
index a32c605..7539e5a 100644
--- a/adb/client/usb_libusb.cpp
+++ b/adb/client/usb_libusb.cpp
@@ -159,6 +159,7 @@
libusb_get_device_address(device));
}
+#if defined(__linux__)
static std::string get_device_serial_path(libusb_device* device) {
uint8_t ports[7];
int port_count = libusb_get_port_numbers(device, ports, 7);
@@ -172,6 +173,7 @@
path += "/serial";
return path;
}
+#endif
static bool endpoint_is_output(uint8_t endpoint) {
return (endpoint & LIBUSB_ENDPOINT_DIR_MASK) == LIBUSB_ENDPOINT_OUT;
diff --git a/fastboot/Android.mk b/fastboot/Android.mk
index 2c578a9..e675d7d 100644
--- a/fastboot/Android.mk
+++ b/fastboot/Android.mk
@@ -14,8 +14,6 @@
LOCAL_PATH:= $(call my-dir)
-fastboot_version := $(shell git -C $(LOCAL_PATH) rev-parse --short=12 HEAD 2>/dev/null)-android
-
include $(CLEAR_VARS)
LOCAL_C_INCLUDES := \
@@ -39,7 +37,7 @@
LOCAL_MODULE_HOST_OS := darwin linux windows
LOCAL_CFLAGS += -Wall -Wextra -Werror -Wunreachable-code
-LOCAL_CFLAGS += -DFASTBOOT_REVISION='"$(fastboot_version)"'
+LOCAL_CFLAGS += -DFASTBOOT_REVISION=\"$(BUILD_NUMBER_FROM_FILE)\"
LOCAL_SRC_FILES_linux := usb_linux.cpp
LOCAL_STATIC_LIBRARIES_linux := libselinux
diff --git a/libmemunreachable/tests/ThreadCapture_test.cpp b/libmemunreachable/tests/ThreadCapture_test.cpp
index 41ed84e..44aabd7 100644
--- a/libmemunreachable/tests/ThreadCapture_test.cpp
+++ b/libmemunreachable/tests/ThreadCapture_test.cpp
@@ -55,7 +55,7 @@
threads_.reserve(threads);
tids_.reserve(threads);
for (unsigned int i = 0; i < threads; i++) {
- threads_.emplace_back([&, i, threads, this]() {
+ threads_.emplace_back([&, threads, this]() {
{
std::lock_guard<std::mutex> lk(m_);
tids_.push_back(gettid());