Skip to content

Commit 336b7a2

Browse files
committed
[ObjCopy] Fix warning in conditional expression [NFC]
Without the fix gcc warned with ../lib/ObjCopy/ELF/ELFObjcopy.cpp: In function 'uint64_t getSectionFlagsPreserveMask(uint64_t, uint64_t, uint16_t)': ../lib/ObjCopy/ELF/ELFObjcopy.cpp:106:31: warning: enumeral and non-enumeral type in conditional expression [-Wextra] 106 | ~(EMachine == EM_X86_64 ? ELF::SHF_X86_64_LARGE : 0UL); | ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
1 parent 4251aa7 commit 336b7a2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/ObjCopy/ELF/ELFObjcopy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ static uint64_t getSectionFlagsPreserveMask(uint64_t OldFlags,
103103
ELF::SHF_MASKOS | ELF::SHF_MASKPROC | ELF::SHF_TLS |
104104
ELF::SHF_INFO_LINK) &
105105
~ELF::SHF_EXCLUDE &
106-
~(EMachine == EM_X86_64 ? ELF::SHF_X86_64_LARGE : 0UL);
106+
~(EMachine == EM_X86_64 ? (uint64_t)ELF::SHF_X86_64_LARGE : 0UL);
107107
return (OldFlags & PreserveMask) | (NewFlags & ~PreserveMask);
108108
}
109109

0 commit comments

Comments
 (0)