lint: rename functions for handling control statements

No functional change.
This commit is contained in:
rillig 2021-03-21 14:49:21 +00:00
parent 97e5c72af7
commit f23731fc8b
4 changed files with 23 additions and 23 deletions

View File

@ -1,5 +1,5 @@
%{
/* $NetBSD: cgram.y,v 1.195 2021/03/21 10:25:40 rillig Exp $ */
/* $NetBSD: cgram.y,v 1.196 2021/03/21 14:49:21 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@ -35,7 +35,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
__RCSID("$NetBSD: cgram.y,v 1.195 2021/03/21 10:25:40 rillig Exp $");
__RCSID("$NetBSD: cgram.y,v 1.196 2021/03/21 14:49:21 rillig Exp $");
#endif
#include <limits.h>
@ -1753,22 +1753,22 @@ opt_expr:
jump_statement: /* C99 6.8.6 */
goto identifier T_SEMI {
dogoto(getsym($2));
do_goto(getsym($2));
}
| goto error T_SEMI {
symtyp = FVFT;
}
| T_CONTINUE T_SEMI {
docont();
do_continue();
}
| T_BREAK T_SEMI {
dobreak();
do_break();
}
| T_RETURN T_SEMI {
doreturn(NULL);
do_return(NULL);
}
| T_RETURN expr T_SEMI {
doreturn($2);
do_return($2);
}
;

View File

@ -1,4 +1,4 @@
/* $NetBSD: externs1.h,v 1.80 2021/03/20 16:16:32 rillig Exp $ */
/* $NetBSD: externs1.h,v 1.81 2021/03/21 14:49:21 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@ -271,15 +271,15 @@ extern void do1(void);
extern void do2(tnode_t *);
extern void for1(tnode_t *, tnode_t *, tnode_t *);
extern void for2(void);
extern void dogoto(sym_t *);
extern void docont(void);
extern void dobreak(void);
extern void doreturn(tnode_t *);
extern void do_goto(sym_t *);
extern void do_continue(void);
extern void do_break(void);
extern void do_return(tnode_t *);
extern void global_clean_up_decl(bool);
extern void argsused(int);
extern void constcond(int);
extern void fallthru(int);
extern void notreach(int);
extern void not_reached(int);
extern void lintlib(int);
extern void linted(int);
extern void varargs(int);

View File

@ -1,4 +1,4 @@
/* $NetBSD: func.c,v 1.88 2021/03/21 14:36:59 rillig Exp $ */
/* $NetBSD: func.c,v 1.89 2021/03/21 14:49:21 rillig Exp $ */
/*
* Copyright (c) 1994, 1995 Jochen Pohl
@ -37,7 +37,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
__RCSID("$NetBSD: func.c,v 1.88 2021/03/21 14:36:59 rillig Exp $");
__RCSID("$NetBSD: func.c,v 1.89 2021/03/21 14:49:21 rillig Exp $");
#endif
#include <stdlib.h>
@ -940,7 +940,7 @@ for2(void)
* T_GOTO identifier T_SEMI
*/
void
dogoto(sym_t *lab)
do_goto(sym_t *lab)
{
mark_as_used(lab, false, false);
@ -954,7 +954,7 @@ dogoto(sym_t *lab)
* T_BREAK T_SEMI
*/
void
dobreak(void)
do_break(void)
{
cstk_t *ci;
@ -980,7 +980,7 @@ dobreak(void)
* T_CONTINUE T_SEMI
*/
void
docont(void)
do_continue(void)
{
cstk_t *ci;
@ -1005,7 +1005,7 @@ docont(void)
* T_RETURN expr T_SEMI
*/
void
doreturn(tnode_t *tn)
do_return(tnode_t *tn)
{
tnode_t *ln, *rn;
cstk_t *ci;
@ -1251,7 +1251,7 @@ fallthru(int n)
*/
/* ARGSUSED */
void
notreach(int n)
not_reached(int n)
{
reached = false;

View File

@ -1,4 +1,4 @@
/* $NetBSD: lex.c,v 1.14 2021/03/20 19:33:25 rillig Exp $ */
/* $NetBSD: lex.c,v 1.15 2021/03/21 14:49:21 rillig Exp $ */
/*
* Copyright (c) 1996 Christopher G. Demetriou. All Rights Reserved.
@ -38,7 +38,7 @@
#include <sys/cdefs.h>
#if defined(__RCSID) && !defined(lint)
__RCSID("$NetBSD: lex.c,v 1.14 2021/03/20 19:33:25 rillig Exp $");
__RCSID("$NetBSD: lex.c,v 1.15 2021/03/21 14:49:21 rillig Exp $");
#endif
#include <ctype.h>
@ -1170,7 +1170,7 @@ lex_comment(void)
{ "LINTED", true, linted },
{ "LONGLONG", false, longlong },
{ "NOSTRICT", true, linted },
{ "NOTREACHED", false, notreach },
{ "NOTREACHED", false, not_reached },
{ "PRINTFLIKE", true, printflike },
{ "PROTOLIB", true, protolib },
{ "SCANFLIKE", true, scanflike },