Fix a few warnings/errors for compiling with -fno-exceptions.

llvm-svn: 178267
Cr-Mirrored-From: sso://chromium.googlesource.com/_direct/external/github.com/llvm/llvm-project
Cr-Mirrored-Commit: e00e6f23d36a802c7a81876891e4b470513d9cae
diff --git a/src/thread.cpp b/src/thread.cpp
index 7a06b29..6355002 100644
--- a/src/thread.cpp
+++ b/src/thread.cpp
@@ -36,6 +36,8 @@
 #ifndef _LIBCPP_NO_EXCEPTIONS
     if (ec)
         throw system_error(error_code(ec, system_category()), "thread::join failed");
+#else
+    (void)ec;
 #endif  // _LIBCPP_NO_EXCEPTIONS
     __t_ = 0;
 }