Fix a signed/unsigned comparison warning.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122597 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Benjamin Kramer 2010-12-28 13:05:13 +00:00
parent 92f0fcb6df
commit 3fee954b3e

View File

@ -676,7 +676,7 @@ error_code has_magic(const Twine &path, const Twine &magic, bool &result) {
std::FILE *file = std::fopen(Path.data(), "rb");
if (file == 0)
return error_code(errno, posix_category());
int size = ::fread(BufferStorage.data(), 1, Magic.size(), file);
size_t size = ::fread(BufferStorage.data(), 1, Magic.size(), file);
if (size != Magic.size()) {
int error = errno;
bool eof = std::feof(file) != 0;