diff options
author | kris <kris@FreeBSD.org> | 2002-02-04 01:28:45 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2002-02-04 01:28:45 +0000 |
commit | 9c4676241d5feacfe4a7e69835ac1487521e5cf2 (patch) | |
tree | 1f6228726cf3571810378f96a250a61aebf9e93f | |
parent | 94f0c44ca8b799021526de9d5982b60e76315416 (diff) | |
download | FreeBSD-src-9c4676241d5feacfe4a7e69835ac1487521e5cf2.zip FreeBSD-src-9c4676241d5feacfe4a7e69835ac1487521e5cf2.tar.gz |
Mark report() as printflike and fix resulting warnings, including one bug
(get_errmsg -> get_errmsg())
-rw-r--r-- | libexec/bootpd/bootpd.c | 2 | ||||
-rw-r--r-- | libexec/bootpd/dovend.c | 2 | ||||
-rw-r--r-- | libexec/bootpd/getether.c | 2 | ||||
-rw-r--r-- | libexec/bootpd/report.h | 2 |
4 files changed, 4 insertions, 4 deletions
diff --git a/libexec/bootpd/bootpd.c b/libexec/bootpd/bootpd.c index 54de708..03fce45 100644 --- a/libexec/bootpd/bootpd.c +++ b/libexec/bootpd/bootpd.c @@ -1239,7 +1239,7 @@ dovend_rfc1048(bp, hp, bootsize) int bytesleft, len; byte *vp; - static char noroom[] = "%s: No room for \"%s\" option"; + static const char noroom[] = "%s: No room for \"%s\" option"; vp = bp->bp_vend; diff --git a/libexec/bootpd/dovend.c b/libexec/bootpd/dovend.c index 9c8457b..279d59c 100644 --- a/libexec/bootpd/dovend.c +++ b/libexec/bootpd/dovend.c @@ -59,7 +59,7 @@ dovend_rfc1497(hp, buf, len) int bytesleft = len; byte *vp = buf; - static char noroom[] = "%s: No room for \"%s\" option"; + static const char noroom[] = "%s: No room for \"%s\" option"; #define NEED(LEN, MSG) do \ if (bytesleft < (LEN)) { \ report(LOG_NOTICE, noroom, \ diff --git a/libexec/bootpd/getether.c b/libexec/bootpd/getether.c index da582e9..e894e53 100644 --- a/libexec/bootpd/getether.c +++ b/libexec/bootpd/getether.c @@ -139,7 +139,7 @@ getether(ifname, eap) ifc.ifc_buf = (caddr_t) ibuf; if (ioctl(fd, SIOCGIFCONF, (char *) &ifc) < 0 || ifc.ifc_len < sizeof(struct ifreq)) { - report(LOG_ERR, "getether: SIOCGIFCONF: %s", get_errmsg); + report(LOG_ERR, "getether: SIOCGIFCONF: %s", get_errmsg()); goto out; } /* Search interface configuration list for link layer address. */ diff --git a/libexec/bootpd/report.h b/libexec/bootpd/report.h index 6b96ac6..2b6f622 100644 --- a/libexec/bootpd/report.h +++ b/libexec/bootpd/report.h @@ -8,7 +8,7 @@ #endif extern void report_init P((int nolog)); -extern void report P((int, const char *, ...)); +extern void report P((int, const char *, ...)) __printflike(2, 3); extern const char *get_errmsg P((void)); #undef P |