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: remove redundant test for tflag in...
details: https://anonhg.NetBSD.org/src/rev/60c025f2404e
branches: trunk
changeset: 982603:60c025f2404e
user: rillig <rillig%NetBSD.org@localhost>
date: Sun Apr 18 09:50:00 2021 +0000
description:
lint: remove redundant test for tflag in initialization handling
diffstat:
usr.bin/xlint/lint1/init.c | 11 +++++------
1 files changed, 5 insertions(+), 6 deletions(-)
diffs (41 lines):
diff -r 47fbc236b484 -r 60c025f2404e usr.bin/xlint/lint1/init.c
--- a/usr.bin/xlint/lint1/init.c Sun Apr 18 09:39:53 2021 +0000
+++ b/usr.bin/xlint/lint1/init.c Sun Apr 18 09:50:00 2021 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: init.c,v 1.196 2021/04/18 08:00:13 rillig Exp $ */
+/* $NetBSD: init.c,v 1.197 2021/04/18 09:50:00 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.196 2021/04/18 08:00:13 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.197 2021/04/18 09:50:00 rillig Exp $");
#endif
#include <stdlib.h>
@@ -364,11 +364,10 @@
}
static void
-check_no_auto_aggregate(const sym_t *sym)
+check_trad_no_auto_aggregate(const sym_t *sym)
{
- if (tflag &&
- has_automatic_storage_duration(sym) &&
+ if (has_automatic_storage_duration(sym) &&
!is_scalar(sym->s_type->t_tspec)) {
/* no automatic aggregate initialization in trad. C */
warning(188);
@@ -783,7 +782,7 @@
}
if (tflag && in->in_brace_level == NULL)
- check_no_auto_aggregate(in->in_sym);
+ check_trad_no_auto_aggregate(in->in_sym);
if (tflag && tp->t_tspec == UNION) {
/* initialization of union is illegal in traditional C */
Home |
Main Index |
Thread Index |
Old Index