Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/xlint lint: indent local variables consistently



details:   https://anonhg.NetBSD.org/src/rev/38f24f5563f7
branches:  trunk
changeset: 376292:38f24f5563f7
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Jun 09 13:03:49 2023 +0000

description:
lint: indent local variables consistently

No binary change.

diffstat:

 usr.bin/xlint/common/emit.c    |    6 +-
 usr.bin/xlint/common/inittyp.c |    6 +-
 usr.bin/xlint/lint1/decl.c     |   74 +++++++++++++++---------------
 usr.bin/xlint/lint1/emit1.c    |   20 ++++----
 usr.bin/xlint/lint1/err.c      |   24 ++++----
 usr.bin/xlint/lint1/func.c     |   32 ++++++------
 usr.bin/xlint/lint1/lex.c      |   48 +++++++++---------
 usr.bin/xlint/lint1/tree.c     |   86 +++++++++++++++++-----------------
 usr.bin/xlint/lint2/chk.c      |  100 ++++++++++++++++++++--------------------
 usr.bin/xlint/lint2/emit2.c    |    8 +-
 usr.bin/xlint/lint2/hash.c     |   16 +++---
 usr.bin/xlint/lint2/main2.c    |   10 ++--
 usr.bin/xlint/lint2/msg.c      |   18 +++---
 usr.bin/xlint/lint2/read.c     |   86 +++++++++++++++++-----------------
 usr.bin/xlint/xlint/xlint.c    |   22 ++++----
 15 files changed, 278 insertions(+), 278 deletions(-)

diffs (truncated from 1617 to 300 lines):

diff -r 56dda98aa222 -r 38f24f5563f7 usr.bin/xlint/common/emit.c
--- a/usr.bin/xlint/common/emit.c       Fri Jun 09 11:22:31 2023 +0000
+++ b/usr.bin/xlint/common/emit.c       Fri Jun 09 13:03:49 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: emit.c,v 1.18 2023/01/14 09:30:07 rillig Exp $ */
+/*     $NetBSD: emit.c,v 1.19 2023/06/09 13:03:49 rillig Exp $ */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID)
-__RCSID("$NetBSD: emit.c,v 1.18 2023/01/14 09:30:07 rillig Exp $");
+__RCSID("$NetBSD: emit.c,v 1.19 2023/06/09 13:03:49 rillig Exp $");
 #endif
 
 #include <stdio.h>
@@ -106,7 +106,7 @@ outxbuf(void)
 void
 outclr(void)
 {
-       size_t  sz;
+       size_t sz;
 
        if (ob.o_buf != ob.o_next) {
                outchar('\n');
diff -r 56dda98aa222 -r 38f24f5563f7 usr.bin/xlint/common/inittyp.c
--- a/usr.bin/xlint/common/inittyp.c    Fri Jun 09 11:22:31 2023 +0000
+++ b/usr.bin/xlint/common/inittyp.c    Fri Jun 09 13:03:49 2023 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: inittyp.c,v 1.34 2023/05/22 12:55:04 rillig Exp $      */
+/*     $NetBSD: inittyp.c,v 1.35 2023/06/09 13:03:49 rillig Exp $      */
 
 /*
  * Copyright (c) 1994, 1995 Jochen Pohl
@@ -37,7 +37,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID)
-__RCSID("$NetBSD: inittyp.c,v 1.34 2023/05/22 12:55:04 rillig Exp $");
+__RCSID("$NetBSD: inittyp.c,v 1.35 2023/06/09 13:03:49 rillig Exp $");
 #endif
 
 #if defined(IS_LINT1)
@@ -128,7 +128,7 @@ ttab_t      ttab[NTSPEC] = {
 void
 inittyp(void)
 {
-       size_t  i;
+       size_t i;
 
        if (!pflag) {
                for (i = 0; i < NTSPEC; i++)
diff -r 56dda98aa222 -r 38f24f5563f7 usr.bin/xlint/lint1/decl.c
--- a/usr.bin/xlint/lint1/decl.c        Fri Jun 09 11:22:31 2023 +0000
+++ b/usr.bin/xlint/lint1/decl.c        Fri Jun 09 13:03:49 2023 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: decl.c,v 1.315 2023/06/03 21:08:06 rillig Exp $ */
+/* $NetBSD: decl.c,v 1.316 2023/06/09 13:03:49 rillig Exp $ */
 
 /*
  * Copyright (c) 1996 Christopher G. Demetriou.  All Rights Reserved.
@@ -38,7 +38,7 @@
 
 #include <sys/cdefs.h>
 #if defined(__RCSID)
-__RCSID("$NetBSD: decl.c,v 1.315 2023/06/03 21:08:06 rillig Exp $");
+__RCSID("$NetBSD: decl.c,v 1.316 2023/06/09 13:03:49 rillig Exp $");
 #endif
 
 #include <sys/param.h>
@@ -152,7 +152,7 @@ gettyp(tspec_t t)
 type_t *
 block_dup_type(const type_t *tp)
 {
-       type_t  *ntp;
+       type_t *ntp;
 
        ntp = block_zero_alloc(sizeof(*ntp));
        *ntp = *tp;
@@ -163,7 +163,7 @@ block_dup_type(const type_t *tp)
 type_t *
 expr_dup_type(const type_t *tp)
 {
-       type_t  *ntp;
+       type_t *ntp;
 
        ntp = expr_zero_alloc(sizeof(*ntp));
        *ntp = *tp;
@@ -204,7 +204,7 @@ expr_unqualified_type(const type_t *tp)
 bool
 is_incomplete(const type_t *tp)
 {
-       tspec_t t;
+       tspec_t t;
 
        if ((t = tp->t_tspec) == VOID)
                return true;
@@ -259,7 +259,7 @@ dcs_add_storage_class(scl_t sc)
 void
 dcs_add_type(type_t *tp)
 {
-       tspec_t t;
+       tspec_t t;
 
        debug_step("%s: %s", __func__, type_name(tp));
        if (tp->t_typedef) {
@@ -397,7 +397,7 @@ merge_signedness(tspec_t t, tspec_t s)
 static type_t *
 typedef_error(type_t *td, tspec_t t)
 {
-       tspec_t t2;
+       tspec_t t2;
 
        t2 = td->t_tspec;
 
@@ -464,7 +464,7 @@ invalid:
 static void
 set_first_typedef(type_t *tp, sym_t *sym)
 {
-       tspec_t t;
+       tspec_t t;
 
        if (is_struct_or_union(t = tp->t_tspec)) {
                if (tp->t_sou->sou_first_typedef == NULL)
@@ -572,7 +572,7 @@ dcs_add_qualifier(tqual_t q)
 void
 begin_declaration_level(declaration_kind dk)
 {
-       dinfo_t *di;
+       dinfo_t *di;
 
        /* put a new element on the declaration stack */
        di = xcalloc(1, sizeof(*di));
@@ -589,7 +589,7 @@ begin_declaration_level(declaration_kind
 void
 end_declaration_level(void)
 {
-       dinfo_t *di;
+       dinfo_t *di;
 
        debug_step("%s(%s)", __func__, declaration_kind_name(dcs->d_kind));
 
@@ -726,8 +726,8 @@ dcs_adjust_storage_class(void)
 static void
 dcs_merge_declaration_specifiers(void)
 {
-       tspec_t t, s, l, c;
-       type_t  *tp;
+       tspec_t t, s, l, c;
+       type_t *tp;
 
        t = dcs->d_abstract_type; /* VOID, BOOL, CHAR, INT or COMPLEX */
        c = dcs->d_complex_mod; /* FLOAT or DOUBLE */
@@ -917,7 +917,7 @@ alignment_in_bits(const type_t *tp)
 sym_t *
 concat_lists(sym_t *l1, sym_t *l2)
 {
-       sym_t   *l;
+       sym_t *l;
 
        if ((l = l1) == NULL)
                return l2;
@@ -939,8 +939,8 @@ concat_lists(sym_t *l1, sym_t *l2)
 void
 check_type(sym_t *sym)
 {
-       tspec_t to, t;
-       type_t  **tpp, *tp;
+       tspec_t to, t;
+       type_t **tpp, *tp;
 
        tpp = &sym->s_type;
        to = NO_TSPEC;
@@ -1109,9 +1109,9 @@ declare_bit_field(sym_t *dsym, tspec_t *
 sym_t *
 declarator_1_struct_union(sym_t *dsym)
 {
-       type_t  *tp;
-       tspec_t t;
-       int     sz;
+       type_t *tp;
+       tspec_t t;
+       int sz;
        unsigned int o = 0;     /* Appease GCC */
 
        lint_assert(is_member(dsym));
@@ -1457,8 +1457,8 @@ add_function(sym_t *decl, sym_t *args)
 static sym_t *
 new_style_function(sym_t *args)
 {
-       sym_t   *arg, *sym;
-       scl_t   sc;
+       sym_t *arg, *sym;
+       scl_t sc;
 
        /*
         * Declarations of structs/unions/enums in param lists are legal,
@@ -1541,7 +1541,7 @@ check_function_definition(sym_t *sym, bo
 sym_t *
 declarator_name(sym_t *sym)
 {
-       scl_t   sc = NOSCL;
+       scl_t sc = NOSCL;
 
        if (sym->s_scl == NOSCL)
                dcs->d_redeclared_symbol = NULL;
@@ -1669,8 +1669,8 @@ old_style_function_name(sym_t *sym)
 type_t *
 make_tag_type(sym_t *tag, tspec_t kind, bool decl, bool semi)
 {
-       scl_t   scl;
-       type_t  *tp;
+       scl_t scl;
+       type_t *tp;
 
        if (kind == STRUCT)
                scl = STRUCT_TAG;
@@ -2294,8 +2294,8 @@ prototypes_compatible(const type_t *tp1,
 static bool
 matches_no_arg_function(const type_t *tp, bool *dowarn)
 {
-       sym_t   *arg;
-       tspec_t t;
+       sym_t *arg;
+       tspec_t t;
 
        if (tp->t_vararg && dowarn != NULL)
                *dowarn = true;
@@ -2318,9 +2318,9 @@ matches_no_arg_function(const type_t *tp
 static bool
 check_old_style_definition(sym_t *rdsym, sym_t *dsym)
 {
-       sym_t   *args, *pargs, *arg, *parg;
-       int     narg, nparg, n;
-       bool    dowarn, msg;
+       sym_t *args, *pargs, *arg, *parg;
+       int narg, nparg, n;
+       bool dowarn, msg;
 
        args = rdsym->u.s_old_style_args;
        pargs = dsym->s_type->t_args;
@@ -2623,8 +2623,8 @@ check_func_old_style_arguments(void)
 static bool
 check_prototype_declaration(sym_t *arg, sym_t *parg)
 {
-       type_t  *tp, *ptp;
-       bool    dowarn;
+       type_t *tp, *ptp;
+       bool dowarn;
 
        tp = arg->s_type;
        ptp = parg->s_type;
@@ -2859,7 +2859,7 @@ declare_external_in_block(sym_t *dsym)
 static bool
 check_init(sym_t *sym)
 {
-       bool    erred;
+       bool erred;
 
        erred = false;
 
@@ -2891,7 +2891,7 @@ check_init(sym_t *sym)
 sym_t *
 abstract_name(void)
 {
-       sym_t   *sym;
+       sym_t *sym;
 
        lint_assert(dcs->d_kind == DK_ABSTRACT ||
            dcs->d_kind == DK_PROTO_ARG);
@@ -3071,8 +3071,8 @@ check_argument_usage(bool novar, sym_t *
 static void
 check_variable_usage(bool novar, sym_t *sym)
 {
-       scl_t   sc;
-       sym_t   *xsym;
+       scl_t sc;
+       sym_t *xsym;
 
        lint_assert(block_level != 0);
 
@@ -3196,7 +3196,7 @@ check_tag_usage(sym_t *sym)
 void
 check_global_symbols(void)
 {
-       sym_t   *sym;
+       sym_t *sym;
 
        if (block_level != 0 || dcs->d_enclosing != NULL)
                norecover();
@@ -3338,8 +3338,8 @@ print_previous_declaration(const sym_t *
 int
 to_int_constant(tnode_t *tn, bool required)
 {
-       int     i;
-       tspec_t t;
+       int i;
+       tspec_t t;



Home | Main Index | Thread Index | Old Index