From 92e13f2eabebc60644d36283cc40d2433d035b6e Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Wed, 4 Sep 2019 12:51:40 +0000 Subject: [PATCH] Fix "enumeral and non-enumeral type in conditional expression" warnings. NFCI. llvm-svn: 370892 --- llvm/tools/llvm-objcopy/CopyConfig.cpp | 2 +- llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/llvm/tools/llvm-objcopy/CopyConfig.cpp b/llvm/tools/llvm-objcopy/CopyConfig.cpp index 9591e5aeb77e..b3a62a3a6d5e 100644 --- a/llvm/tools/llvm-objcopy/CopyConfig.cpp +++ b/llvm/tools/llvm-objcopy/CopyConfig.cpp @@ -716,7 +716,7 @@ Expected parseObjcopyOptions(ArrayRef ArgsArr) { for (auto Arg : InputArgs.filtered(OBJCOPY_add_symbol)) { Expected NSI = parseNewSymbolInfo( Arg->getValue(), - Config.NewSymbolVisibility.getValueOr(ELF::STV_DEFAULT)); + Config.NewSymbolVisibility.getValueOr((uint8_t)ELF::STV_DEFAULT)); if (!NSI) return NSI.takeError(); Config.SymbolsToAdd.push_back(*NSI); diff --git a/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp b/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp index fa79b6093815..bd49426f9d1c 100644 --- a/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp +++ b/llvm/tools/llvm-objcopy/ELF/ELFObjcopy.cpp @@ -756,7 +756,7 @@ Error executeObjcopyOnIHex(const CopyConfig &Config, MemoryBuffer &In, Error executeObjcopyOnRawBinary(const CopyConfig &Config, MemoryBuffer &In, Buffer &Out) { uint8_t NewSymbolVisibility = - Config.NewSymbolVisibility.getValueOr(ELF::STV_DEFAULT); + Config.NewSymbolVisibility.getValueOr((uint8_t)ELF::STV_DEFAULT); BinaryReader Reader(Config.BinaryArch, &In, NewSymbolVisibility); std::unique_ptr Obj = Reader.create();