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 lint: remove wrong assumption from comment



details:   https://anonhg.NetBSD.org/src/rev/ffd6c00dca07
branches:  trunk
changeset: 954203:ffd6c00dca07
user:      rillig <rillig%NetBSD.org@localhost>
date:      Thu Apr 01 15:06:49 2021 +0000

description:
lint: remove wrong assumption from comment

The size in bits of a struct or union is not measured at all at this
point since portable_size_in_bits only takes the broad type
classification (tspec_t), not the precise type information (type_t).

No functional change.

diffstat:

 usr.bin/xlint/lint1/tree.c |  8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diffs (29 lines):

diff -r fb277ebf2713 -r ffd6c00dca07 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Thu Apr 01 14:59:21 2021 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Thu Apr 01 15:06:49 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.254 2021/03/30 15:18:19 rillig Exp $        */
+/*     $NetBSD: tree.c,v 1.255 2021/04/01 15:06:49 rillig 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.254 2021/03/30 15:18:19 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.255 2021/04/01 15:06:49 rillig Exp $");
 #endif
 
 #include <float.h>
@@ -2233,10 +2233,6 @@
        if (nst == CHAR || nst == UCHAR)
                return false;   /* for the sake of traditional C code */
 
-       /*
-        * XXX: Why should it be ok to cast between arbitrary structs that
-        * just happen to be of the same size?
-        */
        return portable_size_in_bits(nst) != portable_size_in_bits(ost);
 }
 



Home | Main Index | Thread Index | Old Index