Fix / suppress new unused warnings for mingw+clang
Bug: 69933068
Test: mmma system/core
Change-Id: I089166a979d3d8c5ada38a7745d507b555048499
diff --git a/libutils/Android.bp b/libutils/Android.bp
index 4bd2a98..6b50f0c 100644
--- a/libutils/Android.bp
+++ b/libutils/Android.bp
@@ -136,9 +136,12 @@
cflags: ["-Wno-unused-parameter"],
},
- // Under MinGW, ctype.h doesn't need multi-byte support
windows: {
- cflags: ["-DMB_CUR_MAX=1"],
+ cflags: [
+ // Under MinGW, ctype.h doesn't need multi-byte support
+ "-DMB_CUR_MAX=1",
+ "-Wno-unused-private-field",
+ ],
enabled: true,
},
diff --git a/libutils/Threads.cpp b/libutils/Threads.cpp
index 6317c32..7d7f0e2 100644
--- a/libutils/Threads.cpp
+++ b/libutils/Threads.cpp
@@ -348,7 +348,7 @@
mState = (void*) hMutex;
}
-Mutex::Mutex(const char* name)
+Mutex::Mutex(const char* /*name*/)
{
// XXX: name not used for now
HANDLE hMutex;
@@ -359,7 +359,7 @@
mState = (void*) hMutex;
}
-Mutex::Mutex(int type, const char* name)
+Mutex::Mutex(int /*type*/, const char* /*name*/)
{
// XXX: type and name not used for now
HANDLE hMutex;
diff --git a/libutils/misc.cpp b/libutils/misc.cpp
index d95fd05..da28dfa 100644
--- a/libutils/misc.cpp
+++ b/libutils/misc.cpp
@@ -44,8 +44,8 @@
static Vector<sysprop_change_callback_info>* gSyspropList = NULL;
#endif
-void add_sysprop_change_callback(sysprop_change_callback cb, int priority) {
#if !defined(_WIN32)
+void add_sysprop_change_callback(sysprop_change_callback cb, int priority) {
pthread_mutex_lock(&gSyspropMutex);
if (gSyspropList == NULL) {
gSyspropList = new Vector<sysprop_change_callback_info>();
@@ -65,8 +65,10 @@
gSyspropList->add(info);
}
pthread_mutex_unlock(&gSyspropMutex);
-#endif
}
+#else
+void add_sysprop_change_callback(sysprop_change_callback, int) {}
+#endif
#if defined(__ANDROID__)
void (*get_report_sysprop_change_func())() {