[NFC] Fix compiler warning in TestArmv7Disassembly.cpp
authorRaphael Isemann <teemperor@gmail.com>
Tue, 11 Sep 2018 12:45:22 +0000 (12:45 +0000)
committerRaphael Isemann <teemperor@gmail.com>
Tue, 11 Sep 2018 12:45:22 +0000 (12:45 +0000)
The warning is
    comparison of integers of different signs: 'const int' and 'const unsigned long'
and triggered by
    EXPECT_EQ (num_of_instructions, inst_list.GetSize());
as num_of_instructions is an int in this comparison (and the RHS is size_t).

llvm-svn: 341931

lldb/unittests/Disassembler/TestArmv7Disassembly.cpp

index 8767a39292aecdab6006d4ea107090dd791dd3db..005aae512140154814053d435c5fd051fc81aee9 100644 (file)
@@ -48,7 +48,7 @@ void TestArmv7Disassembly::TearDownTestCase() {
 TEST_F(TestArmv7Disassembly, TestCortexFPDisass) {
   ArchSpec arch("armv7em--");
 
-  const int num_of_instructions = 3;
+  const unsigned num_of_instructions = 3;
   uint8_t data[] = {
       0x00, 0xee, 0x10, 0x2a, // 0xee002a10 :  vmov   s0, r2
       0xb8, 0xee, 0xc0, 0x0b, // 0xeeb80bc0 :  vcvt.f64.s32 d0, s0