Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 6 Nov 2011 18:49:48 +0000 (UTC)
From:      Ed Schouten <ed@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r227241 - head/usr.bin/m4
Message-ID:  <201111061849.pA6Inmbh036109@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: ed
Date: Sun Nov  6 18:49:48 2011
New Revision: 227241
URL: http://svn.freebsd.org/changeset/base/227241

Log:
  Mark global functions and/or variables in m4(1) static where possible.
  
  This allows compilers and static analyzers to more thorough analysis.

Modified:
  head/usr.bin/m4/gnum4.c
  head/usr.bin/m4/main.c

Modified: head/usr.bin/m4/gnum4.c
==============================================================================
--- head/usr.bin/m4/gnum4.c	Sun Nov  6 18:49:41 2011	(r227240)
+++ head/usr.bin/m4/gnum4.c	Sun Nov  6 18:49:48 2011	(r227241)
@@ -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;

Modified: head/usr.bin/m4/main.c
==============================================================================
--- head/usr.bin/m4/main.c	Sun Nov  6 18:49:41 2011	(r227240)
+++ head/usr.bin/m4/main.c	Sun Nov  6 18:49:48 2011	(r227241)
@@ -99,7 +99,7 @@ char scommt[MAXCCHARS+1] = {SCOMMT};	/* 
 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 },



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111061849.pA6Inmbh036109>