From 38a77ae91f584a2e192928ac0e2fe77a0eabd1cf Mon Sep 17 00:00:00 2001 From: Benjamin Kramer Date: Thu, 8 Mar 2018 21:54:30 +0000 Subject: [PATCH] [Support] Pacify -Wsign-compare in unit test. llvm-svn: 327070 --- llvm/unittests/Support/MemoryBufferTest.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/unittests/Support/MemoryBufferTest.cpp b/llvm/unittests/Support/MemoryBufferTest.cpp index bafdffe..034b2ea 100644 --- a/llvm/unittests/Support/MemoryBufferTest.cpp +++ b/llvm/unittests/Support/MemoryBufferTest.cpp @@ -277,7 +277,7 @@ TEST_F(MemoryBufferTest, writeThroughFile) { // Write some data. It should be mapped readwrite, so that upon completion // the original file contents are modified. WriteThroughMemoryBuffer &MB = **MBOrError; - ASSERT_EQ(16, MB.getBufferSize()); + ASSERT_EQ(16u, MB.getBufferSize()); char *Start = MB.getBufferStart(); ASSERT_EQ(MB.getBufferEnd(), MB.getBufferStart() + MB.getBufferSize()); ::memset(Start, 'x', MB.getBufferSize()); @@ -286,7 +286,7 @@ TEST_F(MemoryBufferTest, writeThroughFile) { auto MBOrError = MemoryBuffer::getFile(TestPath); ASSERT_FALSE(MBOrError.getError()); auto &MB = **MBOrError; - ASSERT_EQ(16, MB.getBufferSize()); + ASSERT_EQ(16u, MB.getBufferSize()); EXPECT_EQ("xxxxxxxxxxxxxxxx", MB.getBuffer()); } } -- 2.7.4