Module Name: src
Committed By: rillig
Date: Mon Dec 28 19:02:16 UTC 2020
Modified Files:
src/usr.bin/xlint/lint1: init.c tree.c
Log Message:
lint: realign code
To generate a diff of this commit:
cvs rdiff -u -r1.29 -r1.30 src/usr.bin/xlint/lint1/init.c
cvs rdiff -u -r1.90 -r1.91 src/usr.bin/xlint/lint1/tree.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/usr.bin/xlint/lint1/init.c
diff -u src/usr.bin/xlint/lint1/init.c:1.29 src/usr.bin/xlint/lint1/init.c:1.30
--- src/usr.bin/xlint/lint1/init.c:1.29 Mon Dec 28 18:49:02 2020
+++ src/usr.bin/xlint/lint1/init.c Mon Dec 28 19:02:16 2020
@@ -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 @@ popi2(void)
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 @@ popi2(void)
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 @@ pushinit(void)
/* 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 @@ again:
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 @@ nextinit(int brace)
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));
}
}
}
Index: src/usr.bin/xlint/lint1/tree.c
diff -u src/usr.bin/xlint/lint1/tree.c:1.90 src/usr.bin/xlint/lint1/tree.c:1.91
--- src/usr.bin/xlint/lint1/tree.c:1.90 Mon Dec 28 18:49:02 2020
+++ src/usr.bin/xlint/lint1/tree.c Mon Dec 28 19:02:16 2020
@@ -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 @@ cvtcon(op_t op, int arg, type_t *tp, val
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 @@ cvtcon(op_t op, int arg, type_t *tp, val
* 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 @@ cvtcon(op_t op, int arg, type_t *tp, val
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 @@ cvtcon(op_t op, int arg, type_t *tp, val
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));
}
}