Module Name: src Committed By: rillig Date: Sun Sep 5 18:34:50 UTC 2021
Modified Files: src/usr.bin/xlint/common: tyname.c src/usr.bin/xlint/lint1: tree.c Log Message: lint: reduce number of ifdef names No functional change. To generate a diff of this commit: cvs rdiff -u -r1.49 -r1.50 src/usr.bin/xlint/common/tyname.c cvs rdiff -u -r1.379 -r1.380 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/common/tyname.c diff -u src/usr.bin/xlint/common/tyname.c:1.49 src/usr.bin/xlint/common/tyname.c:1.50 --- src/usr.bin/xlint/common/tyname.c:1.49 Sat Sep 4 14:07:51 2021 +++ src/usr.bin/xlint/common/tyname.c Sun Sep 5 18:34:50 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tyname.c,v 1.49 2021/09/04 14:07:51 rillig Exp $ */ +/* $NetBSD: tyname.c,v 1.50 2021/09/05 18:34:50 rillig Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -35,7 +35,7 @@ #include <sys/cdefs.h> #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: tyname.c,v 1.49 2021/09/04 14:07:51 rillig Exp $"); +__RCSID("$NetBSD: tyname.c,v 1.50 2021/09/05 18:34:50 rillig Exp $"); #endif #include <limits.h> @@ -163,7 +163,7 @@ type_name_of_function(buffer *buf, const buf_add(buf, "("); if (tp->t_proto) { -#ifdef t_enum /* lint1 */ +#ifdef IS_LINT1 sym_t *arg; arg = tp->t_args; @@ -173,7 +173,7 @@ type_name_of_function(buffer *buf, const buf_add(buf, sep), sep = ", "; buf_add(buf, type_name(arg->s_type)); } -#else /* lint2 */ +#else type_t **argtype; argtype = tp->t_args; @@ -197,7 +197,7 @@ static void type_name_of_struct_or_union(buffer *buf, const type_t *tp) { buf_add(buf, " "); -#ifdef t_str +#ifdef IS_LINT1 if (tp->t_str->sou_tag->s_name == unnamed && tp->t_str->sou_first_typedef != NULL) { buf_add(buf, "typedef "); @@ -214,7 +214,7 @@ static void type_name_of_enum(buffer *buf, const type_t *tp) { buf_add(buf, " "); -#ifdef t_enum +#ifdef IS_LINT1 if (tp->t_enum->en_tag->s_name == unnamed && tp->t_enum->en_first_typedef != NULL) { buf_add(buf, "typedef "); @@ -231,7 +231,7 @@ static void type_name_of_array(buffer *buf, const type_t *tp) { buf_add(buf, "["); -#ifdef t_str /* lint1 */ +#ifdef IS_LINT1 if (tp->t_incomplete_array) buf_add(buf, "unknown_size"); else @@ -263,7 +263,7 @@ type_name(const type_t *tp) if (tp->t_volatile) buf_add(&buf, "volatile "); -#ifdef t_str +#ifdef IS_LINT1 if ((t == STRUCT || t == UNION) && tp->t_str->sou_incomplete) buf_add(&buf, "incomplete "); #endif Index: src/usr.bin/xlint/lint1/tree.c diff -u src/usr.bin/xlint/lint1/tree.c:1.379 src/usr.bin/xlint/lint1/tree.c:1.380 --- src/usr.bin/xlint/lint1/tree.c:1.379 Sun Sep 5 17:49:55 2021 +++ src/usr.bin/xlint/lint1/tree.c Sun Sep 5 18:34:50 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: tree.c,v 1.379 2021/09/05 17:49:55 rillig Exp $ */ +/* $NetBSD: tree.c,v 1.380 2021/09/05 18:34:50 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.379 2021/09/05 17:49:55 rillig Exp $"); +__RCSID("$NetBSD: tree.c,v 1.380 2021/09/05 18:34:50 rillig Exp $"); #endif #include <float.h> @@ -4321,7 +4321,7 @@ constant_addr(const tnode_t *tn, const s (!is_integer(ot) && ot != PTR)) { return false; } -#ifdef notdef +#if 0 /* * consider: * struct foo {