From df6dd6933d4871d1aa311baa3503fcd8c41bee59 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Sun, 6 Nov 2011 18:49:48 +0000 Subject: [PATCH] Mark global functions and/or variables in m4(1) static where possible. This allows compilers and static analyzers to more thorough analysis. --- usr.bin/m4/gnum4.c | 2 +- usr.bin/m4/main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/m4/gnum4.c b/usr.bin/m4/gnum4.c index edfe296ec058..fce443ce6b63 100644 --- a/usr.bin/m4/gnum4.c +++ b/usr.bin/m4/gnum4.c @@ -60,7 +60,7 @@ int mimic_gnu = 0; * Then M4PATH env variable */ -struct path_entry { +static struct path_entry { char *name; struct path_entry *next; } *first, *last; diff --git a/usr.bin/m4/main.c b/usr.bin/m4/main.c index 0e60fce3ec99..f16b4dffc21a 100644 --- a/usr.bin/m4/main.c +++ b/usr.bin/m4/main.c @@ -99,7 +99,7 @@ char scommt[MAXCCHARS+1] = {SCOMMT}; /* start character for comment */ char ecommt[MAXCCHARS+1] = {ECOMMT}; /* end character for comment */ int synccpp; /* Line synchronisation for C preprocessor */ -struct keyblk keywrds[] = { /* m4 keywords to be installed */ +static const struct keyblk keywrds[] = { /* m4 keywords to be installed */ { "include", INCLTYPE }, { "sinclude", SINCTYPE }, { "define", DEFITYPE },