summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorotto <otto@openbsd.org>2006-05-05 20:00:35 +0000
committerotto <otto@openbsd.org>2006-05-05 20:00:35 +0000
commit0030ce950bb962aee2023dc41ebb7d7356c60e0b (patch)
tree87e8dc08a9c3c4f692687a4467f82d6bc19b8a66
parentsigh, build on non gcc3 systems. (diff)
downloadwireguard-openbsd-0030ce950bb962aee2023dc41ebb7d7356c60e0b.tar.xz
wireguard-openbsd-0030ce950bb962aee2023dc41ebb7d7356c60e0b.zip
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);