Module Name: src
Committed By: rillig
Date: Fri Apr 2 14:19:33 UTC 2021
Modified Files:
src/usr.bin/xlint/lint1: init.c
Log Message:
lint: remove unused brace_level.bl_array_of_unknown_size
Since init.c 1.177 from 2021-03-29, the type of the object to be
initialized is no longer modified in the middle of the initialization,
as required by C99 6.7.8p22. Therefore it is no longer necessary to
keep this redundant information around.
No functional change.
To generate a diff of this commit:
cvs rdiff -u -r1.190 -r1.191 src/usr.bin/xlint/lint1/init.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.190 src/usr.bin/xlint/lint1/init.c:1.191
--- src/usr.bin/xlint/lint1/init.c:1.190 Fri Apr 2 12:16:50 2021
+++ src/usr.bin/xlint/lint1/init.c Fri Apr 2 14:19:33 2021
@@ -1,4 +1,4 @@
-/* $NetBSD: init.c,v 1.190 2021/04/02 12:16:50 rillig Exp $ */
+/* $NetBSD: init.c,v 1.191 2021/04/02 14:19:33 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.190 2021/04/02 12:16:50 rillig Exp $");
+__RCSID("$NetBSD: init.c,v 1.191 2021/04/02 14:19:33 rillig Exp $");
#endif
#include <stdlib.h>
@@ -124,7 +124,6 @@ struct brace_level {
const type_t *bl_type;
const sym_t *bl_next_member; /* for structs and unions */
size_t bl_array_next_subscript;
- bool bl_array_of_unknown_size: 1;
bool bl_scalar_done: 1; /* for scalars */
bool bl_confused: 1; /* skip further checks */
struct designation bl_designation; /* .member[123].member */
@@ -526,8 +525,6 @@ designation_look_up(const struct designa
return tp;
}
-
-
static void
designation_reset(struct designation *dn)
{
@@ -576,9 +573,6 @@ brace_level_debug(const struct brace_lev
debug_printf("type '%s'", type_name(bl->bl_type));
- if (bl->bl_array_of_unknown_size)
- debug_printf(", array of unknown size");
-
if (is_struct_or_union(bl->bl_type->t_tspec) &&
bl->bl_next_member != NULL)
debug_printf(", next member '%s'",