Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/unifdef Pointer differences are generally not intege...
details: https://anonhg.NetBSD.org/src/rev/00f39a6f649d
branches: trunk
changeset: 777681:00f39a6f649d
user: joerg <joerg%NetBSD.org@localhost>
date: Wed Feb 29 23:35:10 2012 +0000
description:
Pointer differences are generally not integers, so use %td here.
diffstat:
usr.bin/unifdef/unifdef.c | 26 +++++++++++++-------------
1 files changed, 13 insertions(+), 13 deletions(-)
diffs (108 lines):
diff -r 665cf1271e4c -r 00f39a6f649d usr.bin/unifdef/unifdef.c
--- a/usr.bin/unifdef/unifdef.c Wed Feb 29 23:34:01 2012 +0000
+++ b/usr.bin/unifdef/unifdef.c Wed Feb 29 23:35:10 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.21 2012/02/29 23:35:10 joerg 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.21 2012/02/29 23:35:10 joerg 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++ != '(')
return (LT_IF);
cp = skipcomment(cp);
@@ -769,7 +769,7 @@
return (LT_IF);
keepthis = false;
} else if (!endsym(*cp)) {
- debug("eval%d symbol", ops - eval_ops);
+ debug("eval%td symbol", ops - eval_ops);
sym = findsym(cp);
if (sym < 0 || symlist)
return (LT_IF);
@@ -783,12 +783,12 @@
cp = skipsym(cp);
keepthis = false;
} else {
- debug("eval%d bad expr", ops - eval_ops);
+ debug("eval%td bad expr", ops - eval_ops);
return (LT_IF);
}
*cpp = cp;
- debug("eval%d = %d", ops - eval_ops, *valp);
+ debug("eval%td = %d", ops - eval_ops, *valp);
return (*valp ? LT_TRUE : LT_FALSE);
}
@@ -802,7 +802,7 @@
const char *cp;
int val;
- debug("eval%d", ops - eval_ops);
+ debug("eval%td", ops - eval_ops);
cp = *cpp;
if (ops->inner(ops+1, valp, &cp) == LT_IF)
return (LT_IF);
@@ -814,14 +814,14 @@
if (op->str == NULL)
break;
cp += strlen(op->str);
- debug("eval%d %s", ops - eval_ops, op->str);
+ debug("eval%td %s", ops - eval_ops, op->str);
if (ops->inner(ops+1, &val, &cp) == LT_IF)
return (LT_IF);
*valp = op->fn(*valp, val);
}
*cpp = cp;
- debug("eval%d = %d", ops - eval_ops, *valp);
+ debug("eval%td = %d", ops - eval_ops, *valp);
return (*valp ? LT_TRUE : LT_FALSE);
}
Home |
Main Index |
Thread Index |
Old Index