mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-25 23:00:15 +00:00
[MC][ELF] Fix gcc "enumeral and non-enumeral type in conditional expression" warning (NFC)
GCC warning: ``` /llvm-project/llvm/lib/MC/ELFObjectWriter.cpp: In member function ‘uint64_t {anonymous}::ELFWriter::writeObject(llvm::MCAssembler&, const llvm::MCAsmLayout&)’: /llvm-project/llvm/lib/MC/ELFObjectWriter.cpp:1137:38: warning: enumeral and non-enumeral type in conditional expression [-Wextra] 1137 | write(uint32_t(Group->isComdat() ? ELF::GRP_COMDAT : 0)); | ~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~ ```
This commit is contained in:
parent
3d10ec0d6a
commit
3ae27fca7e
@ -1134,7 +1134,7 @@ uint64_t ELFWriter::writeObject(MCAssembler &Asm, const MCAsmLayout &Layout) {
|
||||
|
||||
const MCSymbol *SignatureSymbol = Group->getGroup();
|
||||
assert(SignatureSymbol);
|
||||
write(uint32_t(Group->isComdat() ? ELF::GRP_COMDAT : 0));
|
||||
write(uint32_t(Group->isComdat() ? unsigned(ELF::GRP_COMDAT) : 0));
|
||||
for (const MCSectionELF *Member : GroupMembers[SignatureSymbol]) {
|
||||
uint32_t SecIndex = SectionIndexMap.lookup(Member);
|
||||
write(SecIndex);
|
||||
|
Loading…
Reference in New Issue
Block a user