summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDan Willemsen2017-11-30 16:31:54 -0600
committerGerrit Code Review2017-11-30 16:31:54 -0600
commitf106bb6bb822740ea35b5974c2f137ef0a662648 (patch)
tree7eecb2039531d5448cee2b006f5fc5e493cc143b
parent017203b140f2d780fc5c6878bf35da930c9ae2a9 (diff)
parent528f144e779dfd18b550d9176aecf36e1130f449 (diff)
downloadplatform-system-core-f106bb6bb822740ea35b5974c2f137ef0a662648.tar.gz
platform-system-core-f106bb6bb822740ea35b5974c2f137ef0a662648.tar.xz
platform-system-core-f106bb6bb822740ea35b5974c2f137ef0a662648.zip
Merge "Fix / suppress new unused warnings for mingw+clang"
-rw-r--r--base/Android.bp1
-rw-r--r--base/logging_test.cpp2
-rw-r--r--base/utf8.cpp2
-rw-r--r--fastboot/fs.cpp2
-rw-r--r--libcutils/sockets_windows.cpp2
-rw-r--r--libcutils/threads.cpp2
-rw-r--r--libutils/Android.bp7
-rw-r--r--libutils/Threads.cpp4
-rw-r--r--libutils/misc.cpp6
9 files changed, 18 insertions, 10 deletions
diff --git a/base/Android.bp b/base/Android.bp
index 7ff02a0ee..ad0edf4a9 100644
--- a/base/Android.bp
+++ b/base/Android.bp
@@ -129,6 +129,7 @@ cc_test {
129 }, 129 },
130 windows: { 130 windows: {
131 srcs: ["utf8_test.cpp"], 131 srcs: ["utf8_test.cpp"],
132 cflags: ["-Wno-unused-parameter"],
132 enabled: true, 133 enabled: true,
133 }, 134 },
134 }, 135 },
diff --git a/base/logging_test.cpp b/base/logging_test.cpp
index adb041b32..6f05d9b7f 100644
--- a/base/logging_test.cpp
+++ b/base/logging_test.cpp
@@ -192,6 +192,7 @@ TEST(logging, WOULD_LOG_VERBOSE_enabled) {
192#undef CHECK_WOULD_LOG_ENABLED 192#undef CHECK_WOULD_LOG_ENABLED
193 193
194 194
195#if !defined(_WIN32)
195static std::string make_log_pattern(android::base::LogSeverity severity, 196static std::string make_log_pattern(android::base::LogSeverity severity,
196 const char* message) { 197 const char* message) {
197 static const char log_characters[] = "VDIWEFF"; 198 static const char log_characters[] = "VDIWEFF";
@@ -203,6 +204,7 @@ static std::string make_log_pattern(android::base::LogSeverity severity,
203 "%c \\d+-\\d+ \\d+:\\d+:\\d+ \\s*\\d+ \\s*\\d+ %s:\\d+] %s", 204 "%c \\d+-\\d+ \\d+:\\d+:\\d+ \\s*\\d+ \\s*\\d+ %s:\\d+] %s",
204 log_char, basename(&holder[0]), message); 205 log_char, basename(&holder[0]), message);
205} 206}
207#endif
206 208
207static void CheckMessage(const CapturedStderr& cap, 209static void CheckMessage(const CapturedStderr& cap,
208 android::base::LogSeverity severity, const char* expected) { 210 android::base::LogSeverity severity, const char* expected) {
diff --git a/base/utf8.cpp b/base/utf8.cpp
index 5984fb06c..adb46d09c 100644
--- a/base/utf8.cpp
+++ b/base/utf8.cpp
@@ -195,7 +195,7 @@ FILE* fopen(const char* name, const char* mode) {
195 return _wfopen(name_utf16.c_str(), mode_utf16.c_str()); 195 return _wfopen(name_utf16.c_str(), mode_utf16.c_str());
196} 196}
197 197
198int mkdir(const char* name, mode_t mode) { 198int mkdir(const char* name, mode_t) {
199 std::wstring name_utf16; 199 std::wstring name_utf16;
200 if (!UTF8PathToWindowsLongPath(name, &name_utf16)) { 200 if (!UTF8PathToWindowsLongPath(name, &name_utf16)) {
201 return -1; 201 return -1;
diff --git a/fastboot/fs.cpp b/fastboot/fs.cpp
index 4141a3bea..320cf7f83 100644
--- a/fastboot/fs.cpp
+++ b/fastboot/fs.cpp
@@ -27,7 +27,7 @@ using android::base::StringPrintf;
27using android::base::unique_fd; 27using android::base::unique_fd;
28 28
29#ifdef WIN32 29#ifdef WIN32
30static int exec_e2fs_cmd(const char* path, char* const argv[]) { 30static int exec_e2fs_cmd(const char* /*path*/, char* const argv[]) {
31 std::string cmd; 31 std::string cmd;
32 int i = 0; 32 int i = 0;
33 while (argv[i] != nullptr) { 33 while (argv[i] != nullptr) {
diff --git a/libcutils/sockets_windows.cpp b/libcutils/sockets_windows.cpp
index 3e49b85b4..df1471220 100644
--- a/libcutils/sockets_windows.cpp
+++ b/libcutils/sockets_windows.cpp
@@ -85,6 +85,6 @@ ssize_t socket_send_buffers(cutils_socket_t sock,
85 return -1; 85 return -1;
86} 86}
87 87
88int android_get_control_socket(const char* name) { 88int android_get_control_socket(const char*) {
89 return -1; 89 return -1;
90} 90}
diff --git a/libcutils/threads.cpp b/libcutils/threads.cpp
index beea8bdfc..a7e6b2d8e 100644
--- a/libcutils/threads.cpp
+++ b/libcutils/threads.cpp
@@ -84,7 +84,7 @@ void* thread_store_get( thread_store_t* store )
84 84
85void thread_store_set( thread_store_t* store, 85void thread_store_set( thread_store_t* store,
86 void* value, 86 void* value,
87 thread_store_destruct_t destroy ) 87 thread_store_destruct_t /*destroy*/ )
88{ 88{
89 /* XXX: can't use destructor on thread exit */ 89 /* XXX: can't use destructor on thread exit */
90 if (!store->lock_init) { 90 if (!store->lock_init) {
diff --git a/libutils/Android.bp b/libutils/Android.bp
index 4bd2a9859..6b50f0cff 100644
--- a/libutils/Android.bp
+++ b/libutils/Android.bp
@@ -136,9 +136,12 @@ cc_library {
136 cflags: ["-Wno-unused-parameter"], 136 cflags: ["-Wno-unused-parameter"],
137 }, 137 },
138 138
139 // Under MinGW, ctype.h doesn't need multi-byte support
140 windows: { 139 windows: {
141 cflags: ["-DMB_CUR_MAX=1"], 140 cflags: [
141 // Under MinGW, ctype.h doesn't need multi-byte support
142 "-DMB_CUR_MAX=1",
143 "-Wno-unused-private-field",
144 ],
142 145
143 enabled: true, 146 enabled: true,
144 }, 147 },
diff --git a/libutils/Threads.cpp b/libutils/Threads.cpp
index 6317c32d4..7d7f0e283 100644
--- a/libutils/Threads.cpp
+++ b/libutils/Threads.cpp
@@ -348,7 +348,7 @@ Mutex::Mutex()
348 mState = (void*) hMutex; 348 mState = (void*) hMutex;
349} 349}
350 350
351Mutex::Mutex(const char* name) 351Mutex::Mutex(const char* /*name*/)
352{ 352{
353 // XXX: name not used for now 353 // XXX: name not used for now
354 HANDLE hMutex; 354 HANDLE hMutex;
@@ -359,7 +359,7 @@ Mutex::Mutex(const char* name)
359 mState = (void*) hMutex; 359 mState = (void*) hMutex;
360} 360}
361 361
362Mutex::Mutex(int type, const char* name) 362Mutex::Mutex(int /*type*/, const char* /*name*/)
363{ 363{
364 // XXX: type and name not used for now 364 // XXX: type and name not used for now
365 HANDLE hMutex; 365 HANDLE hMutex;
diff --git a/libutils/misc.cpp b/libutils/misc.cpp
index d95fd056b..da28dfae6 100644
--- a/libutils/misc.cpp
+++ b/libutils/misc.cpp
@@ -44,8 +44,8 @@ static pthread_mutex_t gSyspropMutex = PTHREAD_MUTEX_INITIALIZER;
44static Vector<sysprop_change_callback_info>* gSyspropList = NULL; 44static Vector<sysprop_change_callback_info>* gSyspropList = NULL;
45#endif 45#endif
46 46
47void add_sysprop_change_callback(sysprop_change_callback cb, int priority) {
48#if !defined(_WIN32) 47#if !defined(_WIN32)
48void add_sysprop_change_callback(sysprop_change_callback cb, int priority) {
49 pthread_mutex_lock(&gSyspropMutex); 49 pthread_mutex_lock(&gSyspropMutex);
50 if (gSyspropList == NULL) { 50 if (gSyspropList == NULL) {
51 gSyspropList = new Vector<sysprop_change_callback_info>(); 51 gSyspropList = new Vector<sysprop_change_callback_info>();
@@ -65,8 +65,10 @@ void add_sysprop_change_callback(sysprop_change_callback cb, int priority) {
65 gSyspropList->add(info); 65 gSyspropList->add(info);
66 } 66 }
67 pthread_mutex_unlock(&gSyspropMutex); 67 pthread_mutex_unlock(&gSyspropMutex);
68#endif
69} 68}
69#else
70void add_sysprop_change_callback(sysprop_change_callback, int) {}
71#endif
70 72
71#if defined(__ANDROID__) 73#if defined(__ANDROID__)
72void (*get_report_sysprop_change_func())() { 74void (*get_report_sysprop_change_func())() {