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

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


================
Comment at: lib/msan/tests/msan_test.cc:572
@@ -571,3 +571,3 @@
   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);
----------------
FreeBSD implements the POSIX variant. The cast to size_t is to suppress the clang's warning on cast to a pointer from an integer of different size.

http://reviews.llvm.org/D7089

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/






More information about the llvm-commits mailing list