Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-6]: src Pull up the following revisions(s) (requested by joerg in...
details: https://anonhg.NetBSD.org/src/rev/04b071d1f159
branches: netbsd-6
changeset: 773872:04b071d1f159
user: sborrill <sborrill%NetBSD.org@localhost>
date: Mon Mar 05 19:12:06 2012 +0000
description:
Pull up the following revisions(s) (requested by joerg in ticket #75):
usr.sbin/cpuctl/arch/i386.c: revision 1.28
usr.bin/unifdef/unifdef.c: revision 1.21
usr.bin/ktruss/dump.c: revision 1.40
usr.bin/error/error.h: revision 1.19
usr.bin/error/touch.c: revision 1.27
libexec/httpd/dir-index-bozo.c: revision 1.14
games/dab/algor.cc: revision 1.5
games/dab/board.h: revision 1.4
dist/pf/sbin/pflogd/pflogd.c: revision 1.9
dist/pf/sbin/pflogd/pflogd.h: revision 1.5
Fix various format string mismatches
diffstat:
dist/pf/sbin/pflogd/pflogd.c | 6 +++---
dist/pf/sbin/pflogd/pflogd.h | 4 ++--
games/dab/algor.cc | 14 +++++++-------
games/dab/board.h | 5 +++--
libexec/httpd/dir-index-bozo.c | 6 +++---
usr.bin/error/error.h | 4 ++--
usr.bin/error/touch.c | 15 +++++++++------
usr.bin/ktruss/dump.c | 8 ++++----
usr.bin/unifdef/unifdef.c | 26 +++++++++++++-------------
usr.sbin/cpuctl/arch/i386.c | 10 +++++-----
10 files changed, 51 insertions(+), 47 deletions(-)
diffs (truncated from 383 to 300 lines):
diff -r cf48ef051bac -r 04b071d1f159 dist/pf/sbin/pflogd/pflogd.c
--- a/dist/pf/sbin/pflogd/pflogd.c Mon Mar 05 19:02:17 2012 +0000
+++ b/dist/pf/sbin/pflogd/pflogd.c Mon Mar 05 19:12:06 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pflogd.c,v 1.8 2010/12/13 01:45:38 christos Exp $ */
+/* $NetBSD: pflogd.c,v 1.8.8.1 2012/03/05 19:12:08 sborrill Exp $ */
/* $OpenBSD: pflogd.c,v 1.45 2007/06/06 14:11:26 henning Exp $ */
/*
@@ -559,7 +559,7 @@
#endif
if (len < sizeof(*h) || h->caplen > (size_t)cur_snaplen) {
- logmsg(LOG_NOTICE, "invalid size %u (%u/%u), packet dropped",
+ logmsg(LOG_NOTICE, "invalid size %zu (%u/%u), packet dropped",
len, cur_snaplen, snaplen);
packets_dropped++;
return;
@@ -770,7 +770,7 @@
logmsg(LOG_WARNING, "Reading stats: %s", pcap_geterr(hpcap));
else
logmsg(LOG_NOTICE,
- "%u packets received, %u/%u dropped (kernel/pflogd)",
+ "%u packets received, %u/%ld dropped (kernel/pflogd)",
pstat.ps_recv, pstat.ps_drop, packets_dropped);
pcap_close(hpcap);
diff -r cf48ef051bac -r 04b071d1f159 dist/pf/sbin/pflogd/pflogd.h
--- a/dist/pf/sbin/pflogd/pflogd.h Mon Mar 05 19:02:17 2012 +0000
+++ b/dist/pf/sbin/pflogd/pflogd.h Mon Mar 05 19:12:06 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pflogd.h,v 1.4 2008/06/18 09:06:26 yamt Exp $ */
+/* $NetBSD: pflogd.h,v 1.4.20.1 2012/03/05 19:12:08 sborrill Exp $ */
/* $OpenBSD: pflogd.h,v 1.3 2006/01/15 16:38:04 canacar Exp $ */
/*
@@ -36,7 +36,7 @@
#define PFLOGD_MAXSNAPLEN INT_MAX
#define PFLOGD_BUFSIZE 65536 /* buffer size for incoming packets */
-void logmsg(int priority, const char *message, ...);
+void logmsg(int priority, const char *message, ...) __printflike(2, 3);
/* Privilege separation */
int priv_init(void);
diff -r cf48ef051bac -r 04b071d1f159 games/dab/algor.cc
--- a/games/dab/algor.cc Mon Mar 05 19:02:17 2012 +0000
+++ b/games/dab/algor.cc Mon Mar 05 19:12:06 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: algor.cc,v 1.4 2008/04/28 20:22:53 martin Exp $ */
+/* $NetBSD: algor.cc,v 1.4.22.1 2012/03/05 19:12:08 sborrill Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
* algor.C: Computer algorithm
*/
#include "defs.h"
-RCSID("$NetBSD: algor.cc,v 1.4 2008/04/28 20:22:53 martin Exp $")
+RCSID("$NetBSD: algor.cc,v 1.4.22.1 2012/03/05 19:12:08 sborrill Exp $")
#include "algor.h"
#include "board.h"
@@ -65,7 +65,7 @@
for (dir = BOX::first; dir < BOX::last; dir++)
if (!box.isset(dir))
return 1;
- b.abort("find_closure: 3 sided box[%d,%d] has no free sides",
+ b.abort("find_closure: 3 sided box[%zu,%zu] has no free sides",
y, x);
}
}
@@ -112,7 +112,7 @@
dir = tdir;
}
if ((mv = b.domove(ty, tx, tdir, getWho())) == -1)
- b.abort("count_closure: Invalid move (%d, %d, %d)", y, x, dir);
+ b.abort("count_closure: Invalid move (%zu, %zu, %d)", y, x, dir);
else
i += mv;
}
@@ -157,7 +157,7 @@
{
// Sanity check; we must have a good box
if (box.count() >= 2)
- b.abort("try_good_turn: box[%d,%d] has more than 2 sides occupied",
+ b.abort("try_good_turn: box[%zu,%zu] has more than 2 sides occupied",
y, x);
// Make sure we don't make a closure in an adjacent box.
@@ -203,7 +203,7 @@
int last)
{
if (4 - box.count() <= last)
- b.abort("try_bad_turn: Called at [%d,%d] for %d with %d",
+ b.abort("try_bad_turn: Called at [%zu,%zu] for %d with %d",
y, x, last, box.count());
for (dir = BOX::first; dir < BOX::last; dir++)
if (!box.isset(dir)) {
@@ -246,7 +246,7 @@
// Play a bad move that would cause the opponent's closure
if ((mv = nb.domove(ty, tx, tdir, getWho())) != 0)
- b.abort("find_min_closure1: Invalid move %d (%d, %d, %d)", mv,
+ b.abort("find_min_closure1: Invalid move %d (%zu, %zu, %d)", mv,
ty, tx, tdir);
// Count the opponent's closure
diff -r cf48ef051bac -r 04b071d1f159 games/dab/board.h
--- a/games/dab/board.h Mon Mar 05 19:02:17 2012 +0000
+++ b/games/dab/board.h Mon Mar 05 19:12:06 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: board.h,v 1.3 2011/08/29 20:30:37 joerg Exp $ */
+/* $NetBSD: board.h,v 1.3.4.1 2012/03/05 19:12:08 sborrill Exp $ */
/*-
* Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -72,7 +72,8 @@
void games(size_t i, const PLAYER& p); // Post games
void total(size_t i, const PLAYER& p); // Post totals
void ties(const PLAYER& p); // Post ties
- __dead void abort(const char *s, ...) const; // Algorithm error
+ __printflike(2, 3) __dead
+ void abort(const char *s, ...) const; // Algorithm error
private:
diff -r cf48ef051bac -r 04b071d1f159 libexec/httpd/dir-index-bozo.c
--- a/libexec/httpd/dir-index-bozo.c Mon Mar 05 19:02:17 2012 +0000
+++ b/libexec/httpd/dir-index-bozo.c Mon Mar 05 19:12:06 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dir-index-bozo.c,v 1.13 2011/11/18 09:51:31 mrg Exp $ */
+/* $NetBSD: dir-index-bozo.c,v 1.13.2.1 2012/03/05 19:12:07 sborrill Exp $ */
/* $eterna: dir-index-bozo.c,v 1.20 2011/11/18 09:21:15 mrg Exp $ */
@@ -162,7 +162,7 @@
i++;
memset(spacebuf, ' ', (size_t)i);
spacebuf[i] = '\0';
- bozo_printf(httpd, spacebuf);
+ bozo_printf(httpd, "%s", spacebuf);
l += i;
if (nostat)
@@ -180,7 +180,7 @@
i++;
memset(spacebuf, ' ', (size_t)i);
spacebuf[i] = '\0';
- bozo_printf(httpd, spacebuf);
+ bozo_printf(httpd, "%s", spacebuf);
bozo_printf(httpd, "%7ukB",
((unsigned)((unsigned)(sb.st_size) >> 10)));
diff -r cf48ef051bac -r 04b071d1f159 usr.bin/error/error.h
--- a/usr.bin/error/error.h Mon Mar 05 19:02:17 2012 +0000
+++ b/usr.bin/error/error.h Mon Mar 05 19:12:06 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: error.h,v 1.18 2011/08/17 13:11:22 christos Exp $ */
+/* $NetBSD: error.h,v 1.18.4.1 2012/03/05 19:12:07 sborrill Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -114,7 +114,7 @@
extern boolean query;
extern boolean terse;
-int inquire(const char *, ...); /* inquire for yes/no */
+int inquire(const char *, ...) __printflike(1, 2); /* inquire for yes/no */
/*
* codes for inquire() to return
diff -r cf48ef051bac -r 04b071d1f159 usr.bin/error/touch.c
--- a/usr.bin/error/touch.c Mon Mar 05 19:02:17 2012 +0000
+++ b/usr.bin/error/touch.c Mon Mar 05 19:12:06 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: touch.c,v 1.26 2011/05/24 12:24:22 joerg Exp $ */
+/* $NetBSD: touch.c,v 1.26.6.1 2012/03/05 19:12:07 sborrill Exp $ */
/*
* Copyright (c) 1980, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)touch.c 8.1 (Berkeley) 6/6/93";
#endif
-__RCSID("$NetBSD: touch.c,v 1.26 2011/05/24 12:24:22 joerg Exp $");
+__RCSID("$NetBSD: touch.c,v 1.26.6.1 2012/03/05 19:12:07 sborrill Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -388,10 +388,13 @@
int dest = TOSTDOUT;
if (query) {
- switch (inquire(terse
- ? "Touch? "
- : "Do you want to touch file \"%s\"? ",
- name)) {
+ int reply;
+ if (terse)
+ reply = inquire("Touch? ");
+ else
+ reply = inquire("Do you want to touch file \"%s\"? ",
+ name);
+ switch (reply) {
case Q_NO:
case Q_no:
case Q_error:
diff -r cf48ef051bac -r 04b071d1f159 usr.bin/ktruss/dump.c
--- a/usr.bin/ktruss/dump.c Mon Mar 05 19:02:17 2012 +0000
+++ b/usr.bin/ktruss/dump.c Mon Mar 05 19:12:06 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: dump.c,v 1.39 2012/02/01 05:34:43 dholland Exp $ */
+/* $NetBSD: dump.c,v 1.39.2.1 2012/03/05 19:12:07 sborrill Exp $ */
/*-
* Copyright (c) 1988, 1993
@@ -39,7 +39,7 @@
#if 0
static char sccsid[] = "@(#)kdump.c 8.4 (Berkeley) 4/28/95";
#endif
-__RCSID("$NetBSD: dump.c,v 1.39 2012/02/01 05:34:43 dholland Exp $");
+__RCSID("$NetBSD: dump.c,v 1.39.2.1 2012/03/05 19:12:07 sborrill Exp $");
#endif /* not lint */
#include <sys/param.h>
@@ -112,7 +112,7 @@
void syscallnameprint(int);
void syscallprint(struct ktr_header *);
void sysretprint(struct ktr_header *);
-int wprintf(const char *, ...);
+int wprintf(const char *, ...) __printflike(1, 2);
void *xrealloc(void *, size_t *, size_t);
int
@@ -635,7 +635,7 @@
} else
switch (ktr->ktr_code) {
case SYS_mmap:
- wprintf(" = %p", (long)ret);
+ wprintf(" = %p", (void *)ret);
break;
default:
wprintf(" = %ld", (long)ret);
diff -r cf48ef051bac -r 04b071d1f159 usr.bin/unifdef/unifdef.c
--- a/usr.bin/unifdef/unifdef.c Mon Mar 05 19:02:17 2012 +0000
+++ b/usr.bin/unifdef/unifdef.c Mon Mar 05 19:12:06 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: unifdef.c,v 1.20 2011/09/16 15:39:30 joerg Exp $ */
+/* $NetBSD: unifdef.c,v 1.20.4.1 2012/03/05 19:12:07 sborrill Exp $ */
/*
* Copyright (c) 1985, 1993
@@ -77,7 +77,7 @@
#endif
#ifdef __IDSTRING
__IDSTRING(Berkeley, "@(#)unifdef.c 8.1 (Berkeley) 6/6/93");
-__IDSTRING(NetBSD, "$NetBSD: unifdef.c,v 1.20 2011/09/16 15:39:30 joerg Exp $");
+__IDSTRING(NetBSD, "$NetBSD: unifdef.c,v 1.20.4.1 2012/03/05 19:12:07 sborrill Exp $");
__IDSTRING(dotat, "$dotat: things/unifdef.c,v 1.161 2003/07/01 15:32:48 fanf2 Exp $");
#endif
#endif /* not lint */
@@ -241,7 +241,7 @@
static int exitstat; /* program exit status */
static void addsym(bool, bool, char *);
-static void debug(const char *, ...);
+static void debug(const char *, ...) __printflike(1, 2);
__dead static void done(void);
__dead static void error(const char *);
static int findsym(const char *);
@@ -736,26 +736,26 @@
cp = skipcomment(*cpp);
if (*cp == '!') {
- debug("eval%d !", ops - eval_ops);
+ debug("eval%td !", ops - eval_ops);
cp++;
if (eval_unary(ops, valp, &cp) == LT_IF)
return (LT_IF);
*valp = !*valp;
} else if (*cp == '(') {
cp++;
- debug("eval%d (", ops - eval_ops);
+ debug("eval%td (", ops - eval_ops);
if (eval_table(eval_ops, valp, &cp) == LT_IF)
return (LT_IF);
cp = skipcomment(cp);
if (*cp++ != ')')
return (LT_IF);
} else if (isdigit((unsigned char)*cp)) {
- debug("eval%d number", ops - eval_ops);
+ debug("eval%td number", ops - eval_ops);
*valp = strtol(cp, &ep, 0);
cp = skipsym(cp);
} else if (strncmp(cp, "defined", 7) == 0 && endsym(cp[7])) {
cp = skipcomment(cp+7);
- debug("eval%d defined", ops - eval_ops);
+ debug("eval%td defined", ops - eval_ops);
if (*cp++ != '(')
Home |
Main Index |
Thread Index |
Old Index