[Lldb-commits] [lldb] a330759 - [lldb] Fix -Wsign-compare in TestSectionSize.cpp (NFC)
Jie Fu via lldb-commits
lldb-commits at lists.llvm.org
Fri Aug 4 17:35:02 PDT 2023
Author: Jie Fu
Date: 2023-08-05T08:34:19+08:00
New Revision: a330759d6e4b7b241b70092e3dd1d0e237ad2a8a
URL: https://github.com/llvm/llvm-project/commit/a330759d6e4b7b241b70092e3dd1d0e237ad2a8a
DIFF: https://github.com/llvm/llvm-project/commit/a330759d6e4b7b241b70092e3dd1d0e237ad2a8a.diff
LOG: [lldb] Fix -Wsign-compare in TestSectionSize.cpp (NFC)
In file included from /data/workspace/llvm-project/lldb/unittests/ObjectFile/PECOFF/TestSectionSize.cpp:10:
/data/workspace/llvm-project/third-party/unittest/googletest/include/gtest/gtest.h:1620:28: error: comparison of integers of different signs: 'c
onst unsigned long' and 'const int' [-Werror,-Wsign-compare]
GTEST_IMPL_CMP_HELPER_(NE, !=);
~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~
Added:
Modified:
lldb/unittests/ObjectFile/PECOFF/TestSectionSize.cpp
Removed:
################################################################################
diff --git a/lldb/unittests/ObjectFile/PECOFF/TestSectionSize.cpp b/lldb/unittests/ObjectFile/PECOFF/TestSectionSize.cpp
index 3ce1e20265f4d9..1a95a0d0fc4e97 100644
--- a/lldb/unittests/ObjectFile/PECOFF/TestSectionSize.cpp
+++ b/lldb/unittests/ObjectFile/PECOFF/TestSectionSize.cpp
@@ -69,10 +69,10 @@ symbols: []
DataExtractor section_data;
ASSERT_NE(object_file->ReadSectionData(swiftast_section.get(),
section_data),
- 0);
+ (size_t)0);
// Check that the section data size is equal to VirtualSize (496)
// without the zero padding, instead of SizeOfRawData (512).
- EXPECT_EQ(section_data.GetByteSize(), 496);
+ EXPECT_EQ(section_data.GetByteSize(), (uint64_t)496);
}
More information about the lldb-commits
mailing list