diff --git a/usr.bin/xlint/lint1/decl.c b/usr.bin/xlint/lint1/decl.c index 4666364b949c..4139d64d4f0e 100644 --- a/usr.bin/xlint/lint1/decl.c +++ b/usr.bin/xlint/lint1/decl.c @@ -1,4 +1,4 @@ -/* $NetBSD: decl.c,v 1.182 2021/05/16 11:11:36 rillig Exp $ */ +/* $NetBSD: decl.c,v 1.183 2021/06/19 11:01:23 rillig Exp $ */ /* * Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved. @@ -38,7 +38,7 @@ #include #if defined(__RCSID) && !defined(lint) -__RCSID("$NetBSD: decl.c,v 1.182 2021/05/16 11:11:36 rillig Exp $"); +__RCSID("$NetBSD: decl.c,v 1.183 2021/06/19 11:01:23 rillig Exp $"); #endif #include @@ -3256,6 +3256,8 @@ check_global_variable_size(const sym_t *sym) * function declaration */ return; + if (sym->s_def == TDEF && sym->s_type->t_tspec == VOID) + return; /* prevent internal error in length() below */ cpos = curr_pos; curr_pos = sym->s_def_pos;