aboutsummaryrefslogtreecommitdiffstats
path: root/tests/string_test.cpp
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2012-10-25 12:22:34 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2012-10-25 12:22:34 -0700
commitdf7f24f310ee3ceb1dc9413d59d5a8816eb584ef (patch)
tree3ea53e1b84167d1479e4688be60fa036c8be7ce4 /tests/string_test.cpp
parent60c7ac262241588f7942ca068f33d706c8fe5cc4 (diff)
parent7b68e3f799d87e84c56687033326924fd8fec84c (diff)
downloadandroid_bionic-df7f24f310ee3ceb1dc9413d59d5a8816eb584ef.tar.gz
android_bionic-df7f24f310ee3ceb1dc9413d59d5a8816eb584ef.tar.bz2
android_bionic-df7f24f310ee3ceb1dc9413d59d5a8816eb584ef.zip
am 7b68e3f7: Merge "Per-thread -fstack-protector guards for x86."
* commit '7b68e3f799d87e84c56687033326924fd8fec84c': Per-thread -fstack-protector guards for x86.
Diffstat (limited to 'tests/string_test.cpp')
-rw-r--r--tests/string_test.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/string_test.cpp b/tests/string_test.cpp
index 47469d853..472aacb0e 100644
--- a/tests/string_test.cpp
+++ b/tests/string_test.cpp
@@ -29,12 +29,13 @@ TEST(string, strerror) {
ASSERT_STREQ("Unknown error 1234", strerror(1234));
}
-static void* ConcurrentStrErrorFn(void* arg) {
+#if __BIONIC__ // glibc's strerror isn't thread safe, only its strsignal.
+
+static void* ConcurrentStrErrorFn(void*) {
bool equal = (strcmp("Unknown error 2002", strerror(2002)) == 0);
return reinterpret_cast<void*>(equal);
}
-#if __BIONIC__ // glibc's strerror isn't thread safe, only its strsignal.
TEST(string, strerror_concurrent) {
const char* strerror1001 = strerror(1001);
ASSERT_STREQ("Unknown error 1001", strerror1001);
@@ -47,6 +48,7 @@ TEST(string, strerror_concurrent) {
ASSERT_STREQ("Unknown error 1001", strerror1001);
}
+
#endif
#if __BIONIC__ // glibc's strerror_r doesn't even have the same signature as the POSIX one.
@@ -88,7 +90,7 @@ TEST(string, strsignal) {
ASSERT_STREQ("Unknown signal 1234", strsignal(1234)); // Too large.
}
-static void* ConcurrentStrSignalFn(void* arg) {
+static void* ConcurrentStrSignalFn(void*) {
bool equal = (strcmp("Unknown signal 2002", strsignal(2002)) == 0);
return reinterpret_cast<void*>(equal);
}