[libc][assert] add __PRINTFLIKE to assert_fail_msg()
Fix a warning as a result of this. fixes issue #302
This commit is contained in:
@@ -113,7 +113,7 @@ void riscv_set_satp(uint asid, paddr_t pt) {
|
||||
#endif
|
||||
|
||||
// make sure the asid is in range
|
||||
DEBUG_ASSERT_MSG((asid & riscv_asid_mask) == asid, "asid %#x mask %#x\n", asid, riscv_asid_mask);
|
||||
DEBUG_ASSERT_MSG((asid & riscv_asid_mask) == asid, "asid %#x mask %#lx\n", asid, riscv_asid_mask);
|
||||
satp |= (ulong)asid << RISCV_SATP_ASID_SHIFT;
|
||||
|
||||
// make sure the page table is aligned
|
||||
|
||||
@@ -88,6 +88,6 @@ __BEGIN_CDECLS
|
||||
// The following functions are called when an assert fails.
|
||||
void assert_fail(const char *file, int line, const char *expression) __NO_RETURN __NO_INLINE;
|
||||
void assert_fail_msg(const char *file, int line, const char *expression, const char *fmt,
|
||||
...) __NO_RETURN __NO_INLINE;
|
||||
...) __PRINTFLIKE(4, 5) __NO_RETURN __NO_INLINE;
|
||||
|
||||
__END_CDECLS
|
||||
|
||||
Reference in New Issue
Block a user