summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOtto Moerbeek <otto@cvs.openbsd.org>2006-05-05 20:00:36 +0000
committerOtto Moerbeek <otto@cvs.openbsd.org>2006-05-05 20:00:36 +0000
commitb13853901a1ffc2e1d3686eaef4f6731037f19d5 (patch)
treef95bc0849bf4d675cb67c066151691d65008dd19
parent040921bddbebbe96fa283e2290ab9dbbd354f0b6 (diff)
Do not warn when casting a pointer to [unsigned] char *;
discussion with espie@; ok cloder@
-rw-r--r--usr.bin/xlint/lint1/tree.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/xlint/lint1/tree.c b/usr.bin/xlint/lint1/tree.c
index c701c8b060d..9ba37610137 100644
--- a/usr.bin/xlint/lint1/tree.c
+++ b/usr.bin/xlint/lint1/tree.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: tree.c,v 1.39 2006/05/03 18:22:41 otto Exp $ */
+/* $OpenBSD: tree.c,v 1.40 2006/05/05 20:00:35 otto 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.39 2006/05/03 18:22:41 otto Exp $";
+static char rcsid[] = "$OpenBSD: tree.c,v 1.40 2006/05/05 20:00:35 otto Exp $";
#endif
#include <stdlib.h>
@@ -1849,7 +1849,7 @@ ppconv(op_t op, tnode_t *tn, type_t *tp)
}
if (((nt == STRUCT || nt == UNION) &&
tp->t_subt->t_str != tn->tn_type->t_subt->t_str) ||
- psize(nt) != psize(ot)) {
+ (psize(nt) != CHAR_BIT && psize(nt) != psize(ot))) {
if (cflag) {
/* pointer casts may be troublesome */
warning(247);