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: reorder struct members to be in co...



details:   https://anonhg.NetBSD.org/src/rev/65b2411572e0
branches:  trunk
changeset: 982149:65b2411572e0
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Apr 02 14:50:47 2021 +0000

description:
lint: reorder struct members to be in comprehension order

No functional change.

diffstat:

 usr.bin/xlint/lint1/init.c |  27 +++++++++++++--------------
 1 files changed, 13 insertions(+), 14 deletions(-)

diffs (65 lines):

diff -r 8e6e821625bc -r 65b2411572e0 usr.bin/xlint/lint1/init.c
--- a/usr.bin/xlint/lint1/init.c        Fri Apr 02 14:41:07 2021 +0000
+++ b/usr.bin/xlint/lint1/init.c        Fri Apr 02 14:50:47 2021 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: init.c,v 1.192 2021/04/02 14:32:27 rillig Exp $        */
+/*     $NetBSD: init.c,v 1.193 2021/04/02 14:50:47 rillig Exp $        */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: init.c,v 1.192 2021/04/02 14:32:27 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.193 2021/04/02 14:50:47 rillig Exp $");
 #endif
 
 #include <stdlib.h>
@@ -117,22 +117,27 @@
  * See C99 6.7.8p17.
  */
 struct brace_level {
-       /*
-        * The type of the current object that is initialized at this brace
-        * level.
-        */
-       const type_t    *bl_type;
+       const type_t    *bl_type;       /* The type of the current object that
+                                        * is initialized at this brace
+                                        * level. */
+
+       struct designation bl_designation;      /* .member[123].member */
 
        const sym_t     *bl_member;             /* for structs and unions */
        size_t          bl_subscript;           /* for arrays */
        bool            bl_scalar_done: 1;      /* for scalars */
        bool            bl_confused: 1;         /* skip further checks */
-       struct designation bl_designation;      /* .member[123].member */
 
        struct brace_level *bl_enclosing;
 };
 
 struct initialization {
+       /* The symbol that is to be initialized. */
+       sym_t           *in_sym;
+
+       /* The innermost brace level. */
+       struct brace_level *in_brace_level;
+
        /*
         * Is set as soon as a fatal error occurred in the initialization.
         * The effect is that the rest of the initialization is ignored
@@ -141,12 +146,6 @@
         */
        bool            in_err;
 
-       /* The symbol that is to be initialized. */
-       sym_t           *in_sym;
-
-       /* The innermost brace level. */
-       struct brace_level *in_brace_level;
-
        struct initialization *in_enclosing;
 };
 



Home | Main Index | Thread Index | Old Index