Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/ic Add __printflike, and fix two incorrect fmts. Rep...



details:   https://anonhg.NetBSD.org/src/rev/3967751b2e00
branches:  trunk
changeset: 459677:3967751b2e00
user:      maxv <maxv%NetBSD.org@localhost>
date:      Sat Sep 21 07:08:27 2019 +0000

description:
Add __printflike, and fix two incorrect fmts. Reported by the lgtm bot.

diffstat:

 sys/dev/ic/mpt.c        |  8 ++++----
 sys/dev/ic/mpt_netbsd.h |  4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)

diffs (54 lines):

diff -r 325f070460f0 -r 3967751b2e00 sys/dev/ic/mpt.c
--- a/sys/dev/ic/mpt.c  Sat Sep 21 06:56:51 2019 +0000
+++ b/sys/dev/ic/mpt.c  Sat Sep 21 07:08:27 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mpt.c,v 1.18 2018/01/30 20:15:41 jakllsch Exp $        */
+/*     $NetBSD: mpt.c,v 1.19 2019/09/21 07:08:27 maxv Exp $    */
 
 /*
  * Copyright (c) 2000, 2001 by Greg Ansley
@@ -110,7 +110,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpt.c,v 1.18 2018/01/30 20:15:41 jakllsch Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpt.c,v 1.19 2019/09/21 07:08:27 maxv Exp $");
 
 #include <dev/ic/mpt.h>
 
@@ -327,7 +327,7 @@
        if (mpt->verbose > 1) {
                u_int32_t *pReq;
                pReq = req->req_vbuf;
-               mpt_prt(mpt, "Send Request %d (0x%x):",
+               mpt_prt(mpt, "Send Request %d (%#lx):",
                    req->index, req->req_pbuf);
                mpt_prt(mpt, "%08x %08x %08x %08x",
                    pReq[0], pReq[1], pReq[2], pReq[3]);
@@ -460,7 +460,7 @@
        /* With the second word, we can now look at the length */
        if (mpt->verbose > 1 && ((reply_len >> 1) != hdr->MsgLength)) {
                mpt_prt(mpt, "reply length does not match message length: "
-                       "got 0x%02x, expected 0x%02x",
+                       "got 0x%02x, expected %#02zx",
                        hdr->MsgLength << 2, reply_len << 1);
        }
 
diff -r 325f070460f0 -r 3967751b2e00 sys/dev/ic/mpt_netbsd.h
--- a/sys/dev/ic/mpt_netbsd.h   Sat Sep 21 06:56:51 2019 +0000
+++ b/sys/dev/ic/mpt_netbsd.h   Sat Sep 21 07:08:27 2019 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mpt_netbsd.h,v 1.12 2018/01/30 19:13:08 jakllsch Exp $ */
+/*     $NetBSD: mpt_netbsd.h,v 1.13 2019/09/21 07:08:27 maxv Exp $     */
 
 /*
  * Copyright (c) 2003 Wasabi Systems, Inc.
@@ -253,7 +253,7 @@
 void   mpt_scsipi_attach(mpt_softc_t *);
 int    mpt_dma_mem_alloc(mpt_softc_t *);
 int    mpt_intr(void *);
-void   mpt_prt(mpt_softc_t *, const char *, ...);
+void   mpt_prt(mpt_softc_t *, const char *, ...) __printflike(2, 3);
 
 #define        mpt_set_config_regs(mpt)                                \
 do {                                                           \



Home | Main Index | Thread Index | Old Index