diff --git a/llvm/tools/lli/RemoteJITUtils.h b/llvm/tools/lli/RemoteJITUtils.h index 792d8d0dedf3..a3f3fa0fd3b4 100644 --- a/llvm/tools/lli/RemoteJITUtils.h +++ b/llvm/tools/lli/RemoteJITUtils.h @@ -31,7 +31,7 @@ public: std::error_code readBytes(char *Dst, unsigned Size) override { assert(Dst && "Attempt to read into null."); ssize_t ReadResult = ::read(InFD, Dst, Size); - if (ReadResult != Size) + if (ReadResult != (ssize_t)Size) return std::error_code(errno, std::generic_category()); return std::error_code(); } @@ -39,7 +39,7 @@ public: std::error_code appendBytes(const char *Src, unsigned Size) override { assert(Src && "Attempt to append from null."); ssize_t WriteResult = ::write(OutFD, Src, Size); - if (WriteResult != Size) + if (WriteResult != (ssize_t)Size) std::error_code(errno, std::generic_category()); return std::error_code(); }