[PATCH] [Msan] Fix the strerror_r unit test to build on FreeBSD

Viktor Kutuzov vkutuzov at accesssoftek.com
Wed Jan 21 03:54:54 PST 2015


Hi kcc, samsonov, eugenis, emaste,

http://reviews.llvm.org/D7089

Files:
  lib/msan/tests/msan_test.cc

Index: lib/msan/tests/msan_test.cc
===================================================================
--- lib/msan/tests/msan_test.cc
+++ lib/msan/tests/msan_test.cc
@@ -569,7 +569,7 @@
 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));

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D7089.18500.patch
Type: text/x-patch
Size: 491 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150121/02e998e5/attachment.bin>


More information about the llvm-commits mailing list