[llvm] r370892 - Fix "enumeral and non-enumeral type in conditional expression" warnings. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Sep 4 05:51:40 PDT 2019
Author: rksimon
Date: Wed Sep 4 05:51:40 2019
New Revision: 370892
URL: http://llvm.org/viewvc/llvm-project?rev=370892&view=rev
Log:
Fix "enumeral and non-enumeral type in conditional expression" warnings. NFCI.
Modified:
llvm/trunk/tools/llvm-objcopy/CopyConfig.cpp
llvm/trunk/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
Modified: llvm/trunk/tools/llvm-objcopy/CopyConfig.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objcopy/CopyConfig.cpp?rev=370892&r1=370891&r2=370892&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objcopy/CopyConfig.cpp (original)
+++ llvm/trunk/tools/llvm-objcopy/CopyConfig.cpp Wed Sep 4 05:51:40 2019
@@ -716,7 +716,7 @@ Expected<DriverConfig> parseObjcopyOptio
for (auto Arg : InputArgs.filtered(OBJCOPY_add_symbol)) {
Expected<NewSymbolInfo> 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);
Modified: llvm/trunk/tools/llvm-objcopy/ELF/ELFObjcopy.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/tools/llvm-objcopy/ELF/ELFObjcopy.cpp?rev=370892&r1=370891&r2=370892&view=diff
==============================================================================
--- llvm/trunk/tools/llvm-objcopy/ELF/ELFObjcopy.cpp (original)
+++ llvm/trunk/tools/llvm-objcopy/ELF/ELFObjcopy.cpp Wed Sep 4 05:51:40 2019
@@ -756,7 +756,7 @@ Error executeObjcopyOnIHex(const CopyCon
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<Object> Obj = Reader.create();
More information about the llvm-commits
mailing list