Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/usr.bin/xlint/lint1 Be more specific about the type errors
details: https://anonhg.NetBSD.org/src/rev/885353e074d3
branches: trunk
changeset: 339589:885353e074d3
user: christos <christos%NetBSD.org@localhost>
date: Wed Jul 29 18:22:06 2015 +0000
description:
Be more specific about the type errors
diffstat:
usr.bin/xlint/lint1/err.c | 6 +++---
usr.bin/xlint/lint1/tree.c | 11 +++++++----
2 files changed, 10 insertions(+), 7 deletions(-)
diffs (62 lines):
diff -r a84847e2f3b1 -r 885353e074d3 usr.bin/xlint/lint1/err.c
--- a/usr.bin/xlint/lint1/err.c Wed Jul 29 15:04:40 2015 +0000
+++ b/usr.bin/xlint/lint1/err.c Wed Jul 29 18:22:06 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: err.c,v 1.47 2014/02/18 22:01:36 christos Exp $ */
+/* $NetBSD: err.c,v 1.48 2015/07/29 18:22:06 christos Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: err.c,v 1.47 2014/02/18 22:01:36 christos Exp $");
+__RCSID("$NetBSD: err.c,v 1.48 2015/07/29 18:22:06 christos Exp $");
#endif
#include <sys/types.h>
@@ -163,7 +163,7 @@
"undefined struct/union member: %s", /* 101 */
"illegal member use: %s", /* 102 */
"left operand of '.' must be struct/union object", /* 103 */
- "left operand of '->' must be pointer to struct/union", /* 104 */
+ "left operand of '->' must be pointer to struct/union and is %s", /* 104 */
"non-unique member requires struct/union %s", /* 105 */
"left operand of '->' must be pointer", /* 106 */
"operands of '%s' have incompatible types (%s != %s)", /* 107 */
diff -r a84847e2f3b1 -r 885353e074d3 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c Wed Jul 29 15:04:40 2015 +0000
+++ b/usr.bin/xlint/lint1/tree.c Wed Jul 29 18:22:06 2015 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: tree.c,v 1.78 2015/02/09 18:17:34 christos Exp $ */
+/* $NetBSD: tree.c,v 1.79 2015/07/29 18:22:06 christos Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: tree.c,v 1.78 2015/02/09 18:17:34 christos Exp $");
+__RCSID("$NetBSD: tree.c,v 1.79 2015/07/29 18:22:06 christos Exp $");
#endif
#include <stdlib.h>
@@ -431,11 +431,14 @@
error(103);
}
} else {
+ char buf[64];
/* left operand of "->" must be pointer to ... */
if (tflag && tn->tn_type->t_tspec == PTR) {
- warning(104);
+ tyname(buf, sizeof(buf), tn->tn_type);
+ warning(104, buf);
} else {
- error(104);
+ tyname(buf, sizeof(buf), tn->tn_type);
+ error(104, buf);
}
}
} else {
Home |
Main Index |
Thread Index |
Old Index