[llvm] r335921 - [SupportTests] Silence -Wsign-compare warnings
Benjamin Kramer via llvm-commits
llvm-commits at lists.llvm.org
Thu Jun 28 14:03:24 PDT 2018
Author: d0k
Date: Thu Jun 28 14:03:24 2018
New Revision: 335921
URL: http://llvm.org/viewvc/llvm-project?rev=335921&view=rev
Log:
[SupportTests] Silence -Wsign-compare warnings
Modified:
llvm/trunk/unittests/Support/FileOutputBufferTest.cpp
Modified: llvm/trunk/unittests/Support/FileOutputBufferTest.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/unittests/Support/FileOutputBufferTest.cpp?rev=335921&r1=335920&r2=335921&view=diff
==============================================================================
--- llvm/trunk/unittests/Support/FileOutputBufferTest.cpp (original)
+++ llvm/trunk/unittests/Support/FileOutputBufferTest.cpp Thu Jun 28 14:03:24 2018
@@ -149,7 +149,7 @@ TEST(FileOutputBuffer, TestModify) {
FileOutputBuffer::create(File1, size_t(-1), FileOutputBuffer::F_modify);
ASSERT_NO_ERROR(errorToErrorCode(BufferOrErr.takeError()));
std::unique_ptr<FileOutputBuffer> &Buffer = *BufferOrErr;
- ASSERT_EQ(10, Buffer->getBufferSize());
+ ASSERT_EQ(10U, Buffer->getBufferSize());
uint8_t *Data = Buffer->getBufferStart();
Data[0] = 'X';
Data[9] = 'X';
@@ -162,7 +162,7 @@ TEST(FileOutputBuffer, TestModify) {
ErrorOr<std::unique_ptr<MemoryBuffer>> BufferOrErr = MemoryBuffer::getFile(File1);
ASSERT_NO_ERROR(BufferOrErr.getError());
std::unique_ptr<MemoryBuffer> Buffer = std::move(*BufferOrErr);
- ASSERT_EQ(10, Buffer->getBufferSize());
+ ASSERT_EQ(10U, Buffer->getBufferSize());
EXPECT_EQ(StringRef("XAAAAAAAAX"), Buffer->getBuffer());
}
More information about the llvm-commits
mailing list