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 },
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to