Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): remove anonymous union from struct Lis...



details:   https://anonhg.NetBSD.org/src/rev/f05a620f3efc
branches:  trunk
changeset: 958410:f05a620f3efc
user:      rillig <rillig%NetBSD.org@localhost>
date:      Sun Jan 03 21:12:03 2021 +0000

description:
make(1): remove anonymous union from struct ListNode

Anonymous structs and unions have been introduced in C11.  The code of
make is supposed to be compatible with C90 though.

The additional members were intended to be used during an interactive
debugging session only and were thus not relevant to running the actual
code.

diffstat:

 usr.bin/make/lst.h |  8 ++------
 1 files changed, 2 insertions(+), 6 deletions(-)

diffs (22 lines):

diff -r de3ff4e40249 -r f05a620f3efc usr.bin/make/lst.h
--- a/usr.bin/make/lst.h        Sun Jan 03 20:44:54 2021 +0000
+++ b/usr.bin/make/lst.h        Sun Jan 03 21:12:03 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: lst.h,v 1.94 2020/12/30 10:03:16 rillig Exp $  */
+/*     $NetBSD: lst.h,v 1.95 2021/01/03 21:12:03 rillig Exp $  */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -90,11 +90,7 @@
 struct ListNode {
        ListNode *prev;         /* previous node in list, or NULL */
        ListNode *next;         /* next node in list, or NULL */
-       union {
-               void *datum;    /* datum associated with this element */
-               const struct GNode *priv_gnode; /* alias, just for debugging */
-               const char *priv_str; /* alias, just for debugging */
-       };
+       void *datum;            /* datum associated with this element */
 };
 
 struct List {



Home | Main Index | Thread Index | Old Index