diff options
| author | George Rimar <grimar@accesssoftek.com> | 2018-08-20 10:29:21 +0000 |
|---|---|---|
| committer | George Rimar <grimar@accesssoftek.com> | 2018-08-20 10:29:21 +0000 |
| commit | 20f994d3501f8eb4aa4e16fb65c1482d990635ad (patch) | |
| tree | 3717471ba5276e372504c5d6ec5104d6e8eb17dc | |
| parent | cba595da825c3a21070b3f9519ae608d8060fb83 (diff) | |
| download | bcm5719-llvm-20f994d3501f8eb4aa4e16fb65c1482d990635ad.tar.gz bcm5719-llvm-20f994d3501f8eb4aa4e16fb65c1482d990635ad.zip | |
[LLD][ELF] - Fix warning.
This fixes the following warning when compiling with gcc version 8.0.1 20180319 (experimental) (GCC):
/home/umb/LLVM/llvm/tools/lld/ELF/SyntheticSections.cpp:1951:46: warning: enumeral and non-enumeral type in conditional expression [-Wextra]
return OS->SectionIndex >= SHN_LORESERVE ? SHN_XINDEX : OS->SectionIndex;
llvm-svn: 340164
| -rw-r--r-- | lld/ELF/SyntheticSections.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lld/ELF/SyntheticSections.cpp b/lld/ELF/SyntheticSections.cpp index f5a24986819..f156c8e43e1 100644 --- a/lld/ELF/SyntheticSections.cpp +++ b/lld/ELF/SyntheticSections.cpp @@ -1948,7 +1948,8 @@ static uint32_t getSymSectionIndex(Symbol *Sym) { if (!isa<Defined>(Sym) || Sym->NeedsPltAddr) return SHN_UNDEF; if (const OutputSection *OS = Sym->getOutputSection()) - return OS->SectionIndex >= SHN_LORESERVE ? SHN_XINDEX : OS->SectionIndex; + return OS->SectionIndex >= SHN_LORESERVE ? (uint32_t)SHN_XINDEX + : OS->SectionIndex; return SHN_ABS; } |

