target/riscv/program.c: fix clang warning
- I'm not sure I understand the logic behind the original statement, but on macOS it fails to compile.
This commit is contained in:
parent
728a617bd4
commit
f5a69e547f
|
@ -478,7 +478,11 @@ riscv_addr_t riscv_program_gah(struct riscv_program *p, riscv_addr_t addr)
|
||||||
|
|
||||||
riscv_addr_t riscv_program_gal(struct riscv_program *p, riscv_addr_t addr)
|
riscv_addr_t riscv_program_gal(struct riscv_program *p, riscv_addr_t addr)
|
||||||
{
|
{
|
||||||
return ((addr > 0) ? 1 : 0) * (addr & 0x7FF);
|
if (addr > 0) {
|
||||||
|
return (addr & 0x7FF);
|
||||||
|
} else {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
int riscv_program_lah(struct riscv_program *p, enum gdb_regno d, riscv_addr_t addr)
|
int riscv_program_lah(struct riscv_program *p, enum gdb_regno d, riscv_addr_t addr)
|
||||||
|
|
Loading…
Reference in New Issue