[compiler-rt] r304941 - Fix tsan test for Darwin. NFCI.

Vedant Kumar via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 7 13:43:16 PDT 2017


Author: vedantk
Date: Wed Jun  7 15:43:15 2017
New Revision: 304941

URL: http://llvm.org/viewvc/llvm-project?rev=304941&view=rev
Log:
Fix tsan test for Darwin. NFCI.

On Darwin, strerror_r returns an int, not a char*. I don't think this
test really depends on what strerror_r returns, so I've used something
else in place of the result of the call to strerror_r.

Modified:
    compiler-rt/trunk/test/tsan/strerror_r.cc

Modified: compiler-rt/trunk/test/tsan/strerror_r.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/tsan/strerror_r.cc?rev=304941&r1=304940&r2=304941&view=diff
==============================================================================
--- compiler-rt/trunk/test/tsan/strerror_r.cc (original)
+++ compiler-rt/trunk/test/tsan/strerror_r.cc Wed Jun  7 15:43:15 2017
@@ -10,7 +10,8 @@
 char buffer[1000];
 
 void *Thread(void *p) {
-  return strerror_r(TEST_ERROR, buffer, sizeof(buffer));
+  (void)strerror_r(TEST_ERROR, buffer, sizeof(buffer));
+  return p;
 }
 
 int main() {




More information about the llvm-commits mailing list