Skip to content

Commit 99ac21a

Browse files
author
Alex B
committed
Address Feedback nr.2
1 parent c9b4ced commit 99ac21a

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

lld/MachO/ObjC.cpp

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -675,21 +675,19 @@ void ObjcCategoryMerger::parseProtocolListInfo(const ConcatInputSection *isec,
675675
ptrList.structCount += protocolCount;
676676
ptrList.structSize = target->wordSize;
677677

678-
uint32_t expectedListSize =
678+
[[maybe_unused]] uint32_t expectedListSize =
679679
(protocolCount * target->wordSize) +
680680
/*header(count)*/ protocolListHeaderLayout.totalSize +
681681
/*extra null value*/ target->wordSize;
682682

683-
// On Swift, the protocol list does not have the extra (unecessary) null value
684-
uint32_t expectedListSizeSwift = expectedListSize - target->wordSize;
683+
// On Swift, the protocol list does not have the extra (unnecessary) null
684+
[[maybe_unused]] uint32_t expectedListSizeSwift =
685+
expectedListSize - target->wordSize;
685686

686687
assert((expectedListSize == ptrListSym->isec()->data.size() ||
687688
expectedListSizeSwift == ptrListSym->isec()->data.size()) &&
688689
"Protocol list does not match expected size");
689690

690-
// Suppress unsuded var warning
691-
(void)expectedListSize, (void)expectedListSizeSwift;
692-
693691
uint32_t off = protocolListHeaderLayout.totalSize;
694692
for (uint32_t inx = 0; inx < protocolCount; ++inx) {
695693
const Reloc *reloc = ptrListSym->isec()->getRelocAt(off);

0 commit comments

Comments
 (0)