target/riscv: Silence -Werror=return-type

- clang compains about the functions not returning a value
This commit is contained in:
Liviu Ionescu 2017-10-03 00:17:57 +03:00
parent 12bb3a4fd4
commit 728a617bd4
2 changed files with 3 additions and 0 deletions

View File

@ -17,6 +17,7 @@ static uint32_t load(const struct target *target, unsigned int rd,
return ld(rd, base, offset);
}
assert(0);
return 0; // Silence -Werror=return-type
}
static uint32_t store(const struct target *target, unsigned int src,
@ -31,6 +32,7 @@ static uint32_t store(const struct target *target, unsigned int src,
return sd(src, base, offset);
}
assert(0);
return 0; // Silence -Werror=return-type
}
#endif

View File

@ -269,6 +269,7 @@ static unsigned int slot_offset(const struct target *target, slot_t slot)
LOG_ERROR("slot_offset called with xlen=%d, slot=%d",
riscv_xlen(target), slot);
assert(0);
return 0; // Silence -Werror=return-type
}
static uint32_t load_slot(const struct target *target, unsigned int dest,