Fixed few warnings.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160142 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Galina Kistanova
2012-07-12 20:45:36 +00:00
parent feae00a68e
commit d897599e5b
3 changed files with 10 additions and 7 deletions
+2 -1
View File
@@ -528,7 +528,8 @@ void raw_fd_ostream::write_impl(const char *Ptr, size_t Size) {
} else {
// Use ::writev() where available.
#if defined(HAVE_WRITEV)
struct iovec IOV = { (void*) Ptr, Size };
const void *Addr = static_cast<const void *>(Ptr);
struct iovec IOV = {const_cast<void *>(Addr), Size };
ret = ::writev(FD, &IOV, 1);
#else
ret = ::write(FD, Ptr, Size);