[Lldb-commits] [lldb] r362784 - Fix some signed/unsigned comparison warnings

Pavel Labath via lldb-commits lldb-commits at lists.llvm.org
Fri Jun 7 02:43:54 PDT 2019


Author: labath
Date: Fri Jun  7 02:43:53 2019
New Revision: 362784

URL: http://llvm.org/viewvc/llvm-project?rev=362784&view=rev
Log:
Fix some signed/unsigned comparison warnings

Modified:
    lldb/trunk/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp

Modified: lldb/trunk/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp?rev=362784&r1=362783&r2=362784&view=diff
==============================================================================
--- lldb/trunk/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp (original)
+++ lldb/trunk/unittests/SymbolFile/DWARF/SymbolFileDWARFTests.cpp Fri Jun  7 02:43:53 2019
@@ -118,16 +118,16 @@ TEST_F(SymbolFileDWARFTests, TestAbbrevO
   EXPECT_FALSE(bool(error));
   // Make sure we have O(1) access to each abbreviation by making sure the
   // index offset is 1 and not UINT32_MAX
-  EXPECT_EQ(abbrev_set.GetIndexOffset(), 1);
+  EXPECT_EQ(abbrev_set.GetIndexOffset(), 1u);
   
   auto abbrev1 = abbrev_set.GetAbbreviationDeclaration(1);
   EXPECT_EQ(abbrev1->Tag(), DW_TAG_compile_unit);
   EXPECT_TRUE(abbrev1->HasChildren());
-  EXPECT_EQ(abbrev1->NumAttributes(), 1);
+  EXPECT_EQ(abbrev1->NumAttributes(), 1u);
   auto abbrev2 = abbrev_set.GetAbbreviationDeclaration(2);
   EXPECT_EQ(abbrev2->Tag(), DW_TAG_subprogram);
   EXPECT_FALSE(abbrev2->HasChildren());
-  EXPECT_EQ(abbrev2->NumAttributes(), 1);
+  EXPECT_EQ(abbrev2->NumAttributes(), 1u);
 }
 
 TEST_F(SymbolFileDWARFTests, TestAbbrevOrder1Start5) {
@@ -163,16 +163,16 @@ TEST_F(SymbolFileDWARFTests, TestAbbrevO
   EXPECT_FALSE(bool(error));
   // Make sure we have O(1) access to each abbreviation by making sure the
   // index offset is 5 and not UINT32_MAX
-  EXPECT_EQ(abbrev_set.GetIndexOffset(), 5);
+  EXPECT_EQ(abbrev_set.GetIndexOffset(), 5u);
   
   auto abbrev1 = abbrev_set.GetAbbreviationDeclaration(5);
   EXPECT_EQ(abbrev1->Tag(), DW_TAG_compile_unit);
   EXPECT_TRUE(abbrev1->HasChildren());
-  EXPECT_EQ(abbrev1->NumAttributes(), 1);
+  EXPECT_EQ(abbrev1->NumAttributes(), 1u);
   auto abbrev2 = abbrev_set.GetAbbreviationDeclaration(6);
   EXPECT_EQ(abbrev2->Tag(), DW_TAG_subprogram);
   EXPECT_FALSE(abbrev2->HasChildren());
-  EXPECT_EQ(abbrev2->NumAttributes(), 1);
+  EXPECT_EQ(abbrev2->NumAttributes(), 1u);
 }
 
 TEST_F(SymbolFileDWARFTests, TestAbbrevOutOfOrder) {
@@ -213,11 +213,11 @@ TEST_F(SymbolFileDWARFTests, TestAbbrevO
   auto abbrev1 = abbrev_set.GetAbbreviationDeclaration(2);
   EXPECT_EQ(abbrev1->Tag(), DW_TAG_compile_unit);
   EXPECT_TRUE(abbrev1->HasChildren());
-  EXPECT_EQ(abbrev1->NumAttributes(), 1);
+  EXPECT_EQ(abbrev1->NumAttributes(), 1u);
   auto abbrev2 = abbrev_set.GetAbbreviationDeclaration(1);
   EXPECT_EQ(abbrev2->Tag(), DW_TAG_subprogram);
   EXPECT_FALSE(abbrev2->HasChildren());
-  EXPECT_EQ(abbrev2->NumAttributes(), 1);
+  EXPECT_EQ(abbrev2->NumAttributes(), 1u);
 }
 
 TEST_F(SymbolFileDWARFTests, TestAbbrevInvalidNULLTag) {




More information about the lldb-commits mailing list