Make kassert_printf use __printflike.
Fix associated errors/warnings while I'm here. Requested by: avg
This commit is contained in:
parent
229a41531c
commit
89aac2b3a1
@ -1138,12 +1138,16 @@ witness_checkorder(struct lock_object *lock, int flags, const char *file,
|
||||
iclass = LOCK_CLASS(interlock);
|
||||
lock1 = find_instance(lock_list, interlock);
|
||||
if (lock1 == NULL)
|
||||
kassert_panic("interlock (%s) %s not locked @ %s:%d",
|
||||
kassert_panic(
|
||||
"interlock (%s) %s not locked while locking"
|
||||
" %s @ %s:%d",
|
||||
iclass->lc_name, interlock->lo_name,
|
||||
flags & LOP_EXCLUSIVE ? "exclusive" : "shared",
|
||||
fixup_filename(file), line);
|
||||
else if ((lock1->li_flags & LI_RECURSEMASK) != 0)
|
||||
kassert_panic("interlock (%s) %s recursed @ %s:%d",
|
||||
kassert_panic(
|
||||
"interlock (%s) %s recursed while locking %s"
|
||||
" @ %s:%d",
|
||||
iclass->lc_name, interlock->lo_name,
|
||||
flags & LOP_EXCLUSIVE ? "exclusive" : "shared",
|
||||
fixup_filename(file), line);
|
||||
|
@ -4485,8 +4485,8 @@ bdata2bio(struct buf *bp, struct bio *bip)
|
||||
bip->bio_flags |= BIO_UNMAPPED;
|
||||
KASSERT(round_page(bip->bio_ma_offset + bip->bio_length) /
|
||||
PAGE_SIZE == bp->b_npages,
|
||||
("Buffer %p too short: %d %d %d", bp, bip->bio_ma_offset,
|
||||
bip->bio_length, bip->bio_ma_n));
|
||||
("Buffer %p too short: %d %lld %d", bp, bip->bio_ma_offset,
|
||||
(long long)bip->bio_length, bip->bio_ma_n));
|
||||
} else {
|
||||
bip->bio_data = bp->b_data;
|
||||
bip->bio_ma = NULL;
|
||||
|
@ -1022,7 +1022,7 @@ ieee80211_mbuf_adjust(struct ieee80211vap *vap, int hdrsize,
|
||||
return NULL;
|
||||
}
|
||||
KASSERT(needed_space <= MHLEN,
|
||||
("not enough room, need %u got %zu\n", needed_space, MHLEN));
|
||||
("not enough room, need %u got %d\n", needed_space, MHLEN));
|
||||
/*
|
||||
* Setup new mbuf to have leading space to prepend the
|
||||
* 802.11 header and any crypto header bits that are
|
||||
|
@ -74,7 +74,7 @@ extern int vm_guest; /* Running as virtual machine guest? */
|
||||
enum VM_GUEST { VM_GUEST_NO = 0, VM_GUEST_VM, VM_GUEST_XEN };
|
||||
|
||||
#if defined(WITNESS) || defined(INVARIANTS)
|
||||
void kassert_panic(const char *fmt, ...);
|
||||
void kassert_panic(const char *fmt, ...) __printflike(1, 2);
|
||||
#endif
|
||||
|
||||
#ifdef INVARIANTS /* The option is always available */
|
||||
|
Loading…
x
Reference in New Issue
Block a user