[compiler-rt] r226800 - [Msan] Fix the strerror_r unit test to build on FreeBSD

Viktor Kutuzov vkutuzov at accesssoftek.com
Thu Jan 22 00:57:59 PST 2015


Author: vkutuzov
Date: Thu Jan 22 02:57:59 2015
New Revision: 226800

URL: http://llvm.org/viewvc/llvm-project?rev=226800&view=rev
Log:
[Msan] Fix the strerror_r unit test to build on FreeBSD
Differential Revision: http://reviews.llvm.org/D7089

Modified:
    compiler-rt/trunk/lib/msan/tests/msan_test.cc

Modified: compiler-rt/trunk/lib/msan/tests/msan_test.cc
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/lib/msan/tests/msan_test.cc?rev=226800&r1=226799&r2=226800&view=diff
==============================================================================
--- compiler-rt/trunk/lib/msan/tests/msan_test.cc (original)
+++ compiler-rt/trunk/lib/msan/tests/msan_test.cc Thu Jan 22 02:57:59 2015
@@ -568,7 +568,7 @@ TEST(MemorySanitizer, strerror) {
 TEST(MemorySanitizer, strerror_r) {
   errno = 0;
   char buf[1000];
-  char *res = strerror_r(EINVAL, buf, sizeof(buf));
+  char *res = (char*) (size_t) strerror_r(EINVAL, buf, sizeof(buf));
   ASSERT_EQ(0, errno);
   if (!res) res = buf; // POSIX version success.
   EXPECT_NOT_POISONED(strlen(res));





More information about the llvm-commits mailing list