Skip to content

Commit 92fb5f2

Browse files
[LLD] NFC: Fixed GCC warning in ELF/Arch/RISCV.cpp
GCC emits warning on this line: error: enumeral and non-enumeral type in conditional expression [-Werror=extra] Change-Id: I04969cc32e27e310968b88ebaa4e1c4894528d74 llvm-svn: 365434
1 parent 619e39b commit 92fb5f2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lld/ELF/Arch/RISCV.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,8 @@ void RISCV::writePlt(uint8_t *Buf, uint64_t GotPltEntryAddr,
176176
}
177177

178178
RelType RISCV::getDynRel(RelType Type) const {
179-
return Type == Target->SymbolicRel ? Type : R_RISCV_NONE;
179+
return Type == Target->SymbolicRel ? Type
180+
: static_cast<RelType>(R_RISCV_NONE);
180181
}
181182

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

0 commit comments

Comments
 (0)