don't pass empty format string in subr_disk.c

this is necessary to enable -Wformat or -Wno-error=format
---
 sys/kern/subr_disk.c |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git sys/kern/subr_disk.c sys/kern/subr_disk.c
index 4b500c1..2b1036a 100644
--- sys/kern/subr_disk.c
+++ sys/kern/subr_disk.c
@@ -761,13 +761,14 @@ diskerr(struct buf *bp, char *dname, char *what, int pri, 
int blkdone,
        daddr_t sn;
 
        if (pri != LOG_PRINTF) {
-               static const char fmt[] = "";
-               log(pri, fmt);
+               log(pri, "%s%d%c: %s %sing fsbn ", dname, unit, partname, what,
+                   bp->b_flags & B_READ ? "read" : "writ");
                pr = addlog;
-       } else
+       } else {
+               printf("%s%d%c: %s %sing fsbn ", dname, unit, partname, what,
+                   bp->b_flags & B_READ ? "read" : "writ");
                pr = printf;
-       (*pr)("%s%d%c: %s %sing fsbn ", dname, unit, partname, what,
-           bp->b_flags & B_READ ? "read" : "writ");
+       }
        sn = bp->b_blkno;
        if (bp->b_bcount <= DEV_BSIZE)
                (*pr)("%lld", sn);
-- 
1.7.6


Reply via email to