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: realign code



details:   https://anonhg.NetBSD.org/src/rev/bb079a7c5043
branches:  trunk
changeset: 958210:bb079a7c5043
user:      rillig <rillig%NetBSD.org@localhost>
date:      Mon Dec 28 19:02:16 2020 +0000

description:
lint: realign code

diffstat:

 usr.bin/xlint/lint1/init.c |  22 ++++++++++++----------
 usr.bin/xlint/lint1/tree.c |  36 ++++++++++++++++++++----------------
 2 files changed, 32 insertions(+), 26 deletions(-)

diffs (158 lines):

diff -r c29f27725452 -r bb079a7c5043 usr.bin/xlint/lint1/init.c
--- a/usr.bin/xlint/lint1/init.c        Mon Dec 28 18:49:02 2020 +0000
+++ b/usr.bin/xlint/lint1/init.c        Mon Dec 28 19:02:16 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: init.c,v 1.29 2020/12/28 18:49:02 rillig Exp $ */
+/*     $NetBSD: init.c,v 1.30 2020/12/28 19:02:16 rillig Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID) && !defined(lint)
-__RCSID("$NetBSD: init.c,v 1.29 2020/12/28 18:49:02 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.30 2020/12/28 19:02:16 rillig Exp $");
 #endif
 
 #include <stdlib.h>
@@ -160,7 +160,7 @@
 
        DPRINTF(("%s+(%s): brace=%d count=%d namedmem %d\n", __func__,
            tyname(buf, sizeof(buf),
-           initstk->i_type ? initstk->i_type : initstk->i_subt),
+               initstk->i_type ? initstk->i_type : initstk->i_subt),
            initstk->i_brace, initstk->i_cnt, initstk->i_namedmem));
        initstk = (istk = initstk)->i_nxt;
        free(istk);
@@ -171,7 +171,7 @@
 
        DPRINTF(("%s-(%s): brace=%d count=%d namedmem %d\n", __func__,
            tyname(buf, sizeof(buf),
-           initstk->i_type ? initstk->i_type : initstk->i_subt),
+               initstk->i_type ? initstk->i_type : initstk->i_subt),
            initstk->i_brace, initstk->i_cnt, initstk->i_namedmem));
 
        istk->i_cnt--;
@@ -263,8 +263,8 @@
 
        /* Extend an incomplete array type by one element */
        if (istk->i_cnt == 0) {
-               DPRINTF(("%s(extend) %s\n", __func__, tyname(buf, sizeof(buf),
-                   istk->i_type)));
+               DPRINTF(("%s(extend) %s\n", __func__,
+                   tyname(buf, sizeof(buf), istk->i_type)));
                /*
                 * Inside of other aggregate types must not be an incomplete
                 * type.
@@ -368,7 +368,7 @@
                istk->i_brace = 1;
                DPRINTF(("%s(): %s brace=%d\n", __func__,
                    tyname(buf, sizeof(buf),
-                   istk->i_type ? istk->i_type : istk->i_subt),
+                       istk->i_type ? istk->i_type : istk->i_subt),
                    istk->i_brace));
                if (cnt == 0) {
                        /* cannot init. struct/union with no named member */
@@ -461,9 +461,11 @@
                if (!initerr) {
                        initstk->i_brace = 1;
                        DPRINTF(("%s(): %p %s brace=%d\n", __func__,
-                           namedmem, tyname(buf, sizeof(buf),
-                           initstk->i_type ? initstk->i_type :
-                           initstk->i_subt), initstk->i_brace));
+                           namedmem,
+                           tyname(buf, sizeof(buf),
+                               initstk->i_type ? initstk->i_type
+                                               : initstk->i_subt),
+                           initstk->i_brace));
                }
        }
 }
diff -r c29f27725452 -r bb079a7c5043 usr.bin/xlint/lint1/tree.c
--- a/usr.bin/xlint/lint1/tree.c        Mon Dec 28 18:49:02 2020 +0000
+++ b/usr.bin/xlint/lint1/tree.c        Mon Dec 28 19:02:16 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tree.c,v 1.90 2020/12/28 18:49:02 rillig Exp $ */
+/*     $NetBSD: tree.c,v 1.91 2020/12/28 19:02:16 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.90 2020/12/28 18:49:02 rillig Exp $");
+__RCSID("$NetBSD: tree.c,v 1.91 2020/12/28 19:02:16 rillig Exp $");
 #endif
 
 #include <stdlib.h>
@@ -1991,13 +1991,14 @@
                                LERROR("cvtcon()");
                        if (op == FARG) {
                                /* conv. of %s to %s is out of rng., arg #%d */
-                               warning(295, tyname(lbuf, sizeof(lbuf),
-                                   gettyp(ot)), tyname(rbuf, sizeof(rbuf), tp),
+                               warning(295,
+                                   tyname(lbuf, sizeof(lbuf), gettyp(ot)),
+                                   tyname(rbuf, sizeof(rbuf), tp),
                                    arg);
                        } else {
                                /* conversion of %s to %s is out of range */
-                               warning(119, tyname(lbuf, sizeof(lbuf),
-                                   gettyp(ot)),
+                               warning(119,
+                                   tyname(lbuf, sizeof(lbuf), gettyp(ot)),
                                    tyname(rbuf, sizeof(rbuf), tp));
                        }
                        v->v_ldbl = v->v_ldbl > 0 ? max : min;
@@ -2085,8 +2086,9 @@
                                 * extra bits set to 0 in conversion
                                 * of '%s' to '%s', op %s
                                 */
-                               warning(309, tyname(lbuf, sizeof(lbuf),
-                                   gettyp(ot)), tyname(rbuf, sizeof(rbuf), tp),
+                               warning(309,
+                                   tyname(lbuf, sizeof(lbuf), gettyp(ot)),
+                                   tyname(rbuf, sizeof(rbuf), tp),
                                    modtab[op].m_name);
                        } else if (nsz < osz &&
                                   (v->v_quad & xmask) != xmask &&
@@ -2148,13 +2150,14 @@
                                warning(196);
                        } else if (op == FARG) {
                                /* conv. of %s to %s is out of rng., arg #%d */
-                               warning(295, tyname(lbuf, sizeof(lbuf),
-                                   gettyp(ot)), tyname(rbuf, sizeof(rbuf), tp),
+                               warning(295,
+                                   tyname(lbuf, sizeof(lbuf), gettyp(ot)),
+                                   tyname(rbuf, sizeof(rbuf), tp),
                                    arg);
                        } else {
                                /* conversion of %s to %s is out of range */
-                               warning(119, tyname(lbuf, sizeof(lbuf),
-                                   gettyp(ot)),
+                               warning(119,
+                                   tyname(lbuf, sizeof(lbuf), gettyp(ot)),
                                    tyname(rbuf, sizeof(rbuf), tp));
                        }
                } else if (nv->v_quad != v->v_quad) {
@@ -2169,13 +2172,14 @@
                                warning(196);
                        } else if (op == FARG) {
                                /* conv. of %s to %s is out of rng., arg #%d */
-                               warning(295, tyname(lbuf, sizeof(lbuf),
-                                   gettyp(ot)), tyname(rbuf, sizeof(rbuf), tp),
+                               warning(295,
+                                   tyname(lbuf, sizeof(lbuf), gettyp(ot)),
+                                   tyname(rbuf, sizeof(rbuf), tp),
                                    arg);
                        } else {
                                /* conversion of %s to %s is out of range */
-                               warning(119, tyname(lbuf, sizeof(lbuf),
-                                   gettyp(ot)),
+                               warning(119,
+                                   tyname(lbuf, sizeof(lbuf), gettyp(ot)),
                                    tyname(rbuf, sizeof(rbuf), tp));
                        }
                }



Home | Main Index | Thread Index | Old Index