Fix / suppress new unused warnings for mingw+clang
Bug: 69933068
Test: mmma system/core
Change-Id: I089166a979d3d8c5ada38a7745d507b555048499
diff --git a/base/Android.bp b/base/Android.bp
index 7ff02a0..ad0edf4 100644
--- a/base/Android.bp
+++ b/base/Android.bp
@@ -129,6 +129,7 @@
},
windows: {
srcs: ["utf8_test.cpp"],
+ cflags: ["-Wno-unused-parameter"],
enabled: true,
},
},
diff --git a/base/logging_test.cpp b/base/logging_test.cpp
index adb041b..6f05d9b 100644
--- a/base/logging_test.cpp
+++ b/base/logging_test.cpp
@@ -192,6 +192,7 @@
#undef CHECK_WOULD_LOG_ENABLED
+#if !defined(_WIN32)
static std::string make_log_pattern(android::base::LogSeverity severity,
const char* message) {
static const char log_characters[] = "VDIWEFF";
@@ -203,6 +204,7 @@
"%c \\d+-\\d+ \\d+:\\d+:\\d+ \\s*\\d+ \\s*\\d+ %s:\\d+] %s",
log_char, basename(&holder[0]), message);
}
+#endif
static void CheckMessage(const CapturedStderr& cap,
android::base::LogSeverity severity, const char* expected) {
diff --git a/base/utf8.cpp b/base/utf8.cpp
index 5984fb0..adb46d0 100644
--- a/base/utf8.cpp
+++ b/base/utf8.cpp
@@ -195,7 +195,7 @@
return _wfopen(name_utf16.c_str(), mode_utf16.c_str());
}
-int mkdir(const char* name, mode_t mode) {
+int mkdir(const char* name, mode_t) {
std::wstring name_utf16;
if (!UTF8PathToWindowsLongPath(name, &name_utf16)) {
return -1;