[llvm] r236234 - Silencing an "enumeral and non-enumeral type in conditional expression" warning; NFC.
Aaron Ballman
aaron at aaronballman.com
Thu Apr 30 07:03:12 PDT 2015
Author: aaronballman
Date: Thu Apr 30 09:03:12 2015
New Revision: 236234
URL: http://llvm.org/viewvc/llvm-project?rev=236234&view=rev
Log:
Silencing an "enumeral and non-enumeral type in conditional expression" warning; NFC.
Modified:
llvm/trunk/lib/MC/ELFObjectWriter.cpp
Modified: llvm/trunk/lib/MC/ELFObjectWriter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/MC/ELFObjectWriter.cpp?rev=236234&r1=236233&r2=236234&view=diff
==============================================================================
--- llvm/trunk/lib/MC/ELFObjectWriter.cpp (original)
+++ llvm/trunk/lib/MC/ELFObjectWriter.cpp Thu Apr 30 09:03:12 2015
@@ -1586,7 +1586,7 @@ void ELFObjectWriter::WriteObject(MCAsse
writeSectionHeader(Sections, Asm, Layout, SectionIndexMap, SectionOffsets);
uint16_t NumSections = (Sections.size() + 1 >= ELF::SHN_LORESERVE)
- ? ELF::SHN_UNDEF
+ ? (uint16_t)ELF::SHN_UNDEF
: Sections.size() + 1;
if (sys::IsLittleEndianHost != IsLittleEndian)
sys::swapByteOrder(NumSections);
More information about the llvm-commits
mailing list