summaryrefslogtreecommitdiff
path: root/usr.bin/xlint
diff options
context:
space:
mode:
authorChad Loder <cloder@cvs.openbsd.org>2006-04-18 04:10:06 +0000
committerChad Loder <cloder@cvs.openbsd.org>2006-04-18 04:10:06 +0000
commitdb5b37d243ea5b59d2c3bb3cf24d1ffc8f8b2673 (patch)
treed7496e43ffb3f2d083320bae1aa4198c1c30c171 /usr.bin/xlint
parent85414c5fc324296d0813ae0d3cbb73ddc8cf9931 (diff)
For prototype argument conversions, include both "from" and "to" types.
Diffstat (limited to 'usr.bin/xlint')
-rw-r--r--usr.bin/xlint/lint1/err.c6
-rw-r--r--usr.bin/xlint/lint1/tree.c14
2 files changed, 11 insertions, 9 deletions
diff --git a/usr.bin/xlint/lint1/err.c b/usr.bin/xlint/lint1/err.c
index 619887af43d..462b07274f3 100644
--- a/usr.bin/xlint/lint1/err.c
+++ b/usr.bin/xlint/lint1/err.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: err.c,v 1.21 2006/04/18 03:59:46 cloder Exp $ */
+/* $OpenBSD: err.c,v 1.22 2006/04/18 04:10:05 cloder Exp $ */
/* $NetBSD: err.c,v 1.8 1995/10/02 17:37:00 jpo Exp $ */
/*
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: err.c,v 1.21 2006/04/18 03:59:46 cloder Exp $";
+static char rcsid[] = "$OpenBSD: err.c,v 1.22 2006/04/18 04:10:05 cloder Exp $";
#endif
/* number of errors found */
@@ -313,7 +313,7 @@ const char *msgs[] = {
"unterminated comment", /* 256 */
"extra characters in lint comment", /* 257 */
"unterminated string constant", /* 258 */
- "%s arg #%d: converted to '%s'", /* 259 */
+ "%s arg #%d: converted from '%s' to '%s'", /* 259 */
"previous declaration of %s", /* 260 */
"previous definition of %s", /* 261 */
"\\\" inside character constants undefined in traditional C", /* 262 */
diff --git a/usr.bin/xlint/lint1/tree.c b/usr.bin/xlint/lint1/tree.c
index 857a907ad6d..450c0771f77 100644
--- a/usr.bin/xlint/lint1/tree.c
+++ b/usr.bin/xlint/lint1/tree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tree.c,v 1.34 2006/04/18 03:59:46 cloder Exp $ */
+/* $OpenBSD: tree.c,v 1.35 2006/04/18 04:10:05 cloder Exp $ */
/* $NetBSD: tree.c,v 1.12 1995/10/02 17:37:57 jpo Exp $ */
/*
@@ -33,7 +33,7 @@
*/
#ifndef lint
-static char rcsid[] = "$OpenBSD: tree.c,v 1.34 2006/04/18 03:59:46 cloder Exp $";
+static char rcsid[] = "$OpenBSD: tree.c,v 1.35 2006/04/18 04:10:05 cloder Exp $";
#endif
#include <stdlib.h>
@@ -1707,8 +1707,9 @@ ptconv(farg_t *farg, tspec_t nt, tspec_t ot, type_t *tp, tnode_t *tn)
if (ptn->tn_op == CON) {
/* ok. promote() warns if constant out of range */
} else {
- /* %s arg #%d: converted to '%s' */
- warning(259, funcname(farg->fa_func), arg, tyname(tp));
+ /* %s arg #%d: converted from '%s' to '%s' */
+ warning(259, funcname(farg->fa_func), arg,
+ tyname(tn->tn_type), tyname(tp));
}
}
} else if (hflag) {
@@ -1723,8 +1724,9 @@ ptconv(farg_t *farg, tspec_t nt, tspec_t ot, type_t *tp, tnode_t *tn)
msb(ptn->tn_val->v_quad, ot, -1) == 0) {
/* ok */
} else {
- /* %s arg #%d: converted to '%s' */
- warning(259, funcname(farg->fa_func), arg, tyname(tp));
+ /* %s arg #%d: converted from '%s' to '%s' */
+ warning(259, funcname(farg->fa_func), arg,
+ tyname(tn->tn_type), tyname(tp));
}
}
}