summaryrefslogtreecommitdiff
path: root/libutils/Threads.cpp
diff options
context:
space:
mode:
authorMark Salyzyn <salyzyn@google.com>2014-04-30 11:10:46 -0700
committerMark Salyzyn <salyzyn@google.com>2014-06-02 15:57:50 -0700
commit5bed8036644f552210a7cfcbed2d6d20cf2981b0 (patch)
tree37f784e181086e99b17e00d46b6da30529751539 /libutils/Threads.cpp
parentbf0f25905b12581f05b65b1ebe95211c727ae483 (diff)
libutils: turn on -Werror
- Deal with some -Wunused issues - Override PRI macros (windows) - Revert use of PRI macros on off64_t (linux) - Deal with a gnu++11 complaince issue Change-Id: Ie66751293bd84477a5a6dfd8a57e700a16e36964
Diffstat (limited to 'libutils/Threads.cpp')
-rw-r--r--libutils/Threads.cpp30
1 files changed, 18 insertions, 12 deletions
diff --git a/libutils/Threads.cpp b/libutils/Threads.cpp
index ff74914cb..cc7fe8993 100644
--- a/libutils/Threads.cpp
+++ b/libutils/Threads.cpp
@@ -17,16 +17,11 @@
// #define LOG_NDEBUG 0
#define LOG_TAG "libutils.threads"
-#include <utils/threads.h>
-#include <utils/Log.h>
-
-#include <cutils/sched_policy.h>
-
+#include <assert.h>
+#include <errno.h>
+#include <memory.h>
#include <stdio.h>
#include <stdlib.h>
-#include <memory.h>
-#include <errno.h>
-#include <assert.h>
#include <unistd.h>
#if defined(HAVE_PTHREADS)
@@ -47,6 +42,17 @@
#include <sys/prctl.h>
#endif
+#include <utils/threads.h>
+#include <utils/Log.h>
+
+#include <cutils/sched_policy.h>
+
+#ifdef HAVE_ANDROID_OS
+# define __android_unused
+#else
+# define __android_unused __attribute__((__unused__))
+#endif
+
/*
* ===========================================================================
* Thread wrappers
@@ -119,7 +125,7 @@ void androidSetThreadName(const char* name) {
int androidCreateRawThreadEtc(android_thread_func_t entryFunction,
void *userData,
- const char* threadName,
+ const char* threadName __android_unused,
int32_t threadPriority,
size_t threadStackSize,
android_thread_id_t *threadId)
@@ -251,9 +257,9 @@ static bool doCreateThread(android_thread_func_t fn, void* arg, android_thread_i
int androidCreateRawThreadEtc(android_thread_func_t fn,
void *userData,
- const char* threadName,
- int32_t threadPriority,
- size_t threadStackSize,
+ const char* /*threadName*/,
+ int32_t /*threadPriority*/,
+ size_t /*threadStackSize*/,
android_thread_id_t *threadId)
{
return doCreateThread( fn, userData, threadId);