Skip to content

Commit

Permalink
[LLD] NFC: Fixed GCC warning in ELF/Arch/RISCV.cpp
Browse files Browse the repository at this point in the history
GCC emits warning on this line:
error: enumeral and non-enumeral type in conditional
expression [-Werror=extra]

Change-Id: I04969cc32e27e310968b88ebaa4e1c4894528d74
llvm-svn: 365434
  • Loading branch information
DenisBakhvalov committed Jul 9, 2019
1 parent 619e39b commit 92fb5f2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lld/ELF/Arch/RISCV.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,8 @@ void RISCV::writePlt(uint8_t *Buf, uint64_t GotPltEntryAddr,
}

RelType RISCV::getDynRel(RelType Type) const {
return Type == Target->SymbolicRel ? Type : R_RISCV_NONE;
return Type == Target->SymbolicRel ? Type
: static_cast<RelType>(R_RISCV_NONE);
}

RelExpr RISCV::getRelExpr(const RelType Type, const Symbol &S,
Expand Down

0 comments on commit 92fb5f2

Please sign in to comment.