[lld] 6800f42 - [lld] Fix warnings

Kazu Hirata via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 18 12:01:31 PDT 2024


Author: Kazu Hirata
Date: 2024-03-18T12:01:24-07:00
New Revision: 6800f422c22ffd672b1e31f0d0a3fa29d19b7a13

URL: https://github.com/llvm/llvm-project/commit/6800f422c22ffd672b1e31f0d0a3fa29d19b7a13
DIFF: https://github.com/llvm/llvm-project/commit/6800f422c22ffd672b1e31f0d0a3fa29d19b7a13.diff

LOG: [lld] Fix warnings

This patch fixes:

  lld/MachO/ObjC.cpp:633:12: error: unused variable 'expectedListSize'
  [-Werror,-Wunused-variable]

  lld/MachO/ObjC.cpp:1034:12: error: unused variable 'newCatDef'
  [-Werror,-Wunused-variable]

Added: 
    

Modified: 
    lld/MachO/ObjC.cpp

Removed: 
    


################################################################################
diff  --git a/lld/MachO/ObjC.cpp b/lld/MachO/ObjC.cpp
index 9b2446360e4f7f..3e26ed5f2ebe82 100644
--- a/lld/MachO/ObjC.cpp
+++ b/lld/MachO/ObjC.cpp
@@ -636,6 +636,7 @@ void ObjcCategoryMerger::parseProtocolListInfo(const ConcatInputSection *isec,
       /*extra null value*/ target->wordSize;
   assert(expectedListSize == ptrListSym->isec->data.size() &&
          "Protocol list does not match expected size");
+  (void)expectedListSize;
 
   uint32_t off = protocolListHeaderLayout.totalSize;
   for (uint32_t inx = 0; inx < protocolCount; ++inx) {
@@ -1033,6 +1034,7 @@ void ObjcCategoryMerger::mergeCategoriesIntoSingleCategory(
 
   Defined *newCatDef = emitCategory(extInfo);
   assert(newCatDef && "Failed to create a new category");
+  (void)newCatDef;
 
   for (auto &catInfo : categories)
     catInfo.wasMerged = true;


        


More information about the llvm-commits mailing list