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/69fa5ee906cb
branches:  trunk
changeset: 960886:69fa5ee906cb
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 c5e650342bb8 -r 69fa5ee906cb 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