]> granicus.if.org Git - flex/commitdiff
lint tweaks
authorVern Paxson <vern@ee.lbl.gov>
Fri, 3 Dec 1993 21:59:50 +0000 (21:59 +0000)
committerVern Paxson <vern@ee.lbl.gov>
Fri, 3 Dec 1993 21:59:50 +0000 (21:59 +0000)
flexdef.h
gen.c
misc.c
sym.c

index b0c818f2b0480eaeb4d5e113c196adde080a4494..bea7aa557d6ba673a8af0eda6dfa8311378e8567 100644 (file)
--- a/flexdef.h
+++ b/flexdef.h
@@ -548,7 +548,7 @@ extern char **scname;
 
 extern int current_max_dfa_size, current_max_xpairs;
 extern int current_max_template_xpairs, current_max_dfas;
-extern int lastdfa, lasttemp, *nxt, *chk, *tnxt;
+extern int lastdfa, *nxt, *chk, *tnxt;
 extern int *base, *def, *nultrans, NUL_ec, tblend, firstfree, **dss, *dfasiz;
 extern union dfaacc_union
        {
diff --git a/gen.c b/gen.c
index 58ff297305f2dc8caac67df2bcffbc82769dcdf0..34c605e744adf1c540450ceebd69c5ff74f20a37 100644 (file)
--- a/gen.c
+++ b/gen.c
@@ -1255,7 +1255,7 @@ void make_tables()
                        printf(
                        "\tif ( yy_current_buffer->is_interactive ) \\\n" );
                        printf(
-               "\t\tresult = (buf[0] = getc( yyin )) == EOF ? 0 : 1; \\\n" );
+"\t\tresult = ((int) (buf[0] = getc( yyin ))) == EOF ? 0 : 1; \\\n" );
                        printf(
 "\telse if ( ((result = fread( (char *) buf, 1, max_size, yyin )) == 0)\\\n" );
                        printf( "\t\t  && ferror( yyin ) ) \\\n" );
diff --git a/misc.c b/misc.c
index 48cf7562a6e11d668e855a59f683288ed6c73ac9..bcc75f303611d09ec12a2b6a984f1f73847af19e 100644 (file)
--- a/misc.c
+++ b/misc.c
@@ -501,7 +501,6 @@ Char myesc( array )
 Char array[];
        {
        Char c, esc_char;
-       register int sptr;
 
        switch ( array[1] )
                {
@@ -530,7 +529,7 @@ Char array[];
                case '8':
                case '9':
                        { /* \<octal> */
-                       sptr = 1;
+                       int sptr = 1;
 
                        while ( isascii( array[sptr] ) &&
                                isdigit( array[sptr] ) )
diff --git a/sym.c b/sym.c
index 28d8f657c94342762a88f9d74ca559598d54a6ef..29c0f30a3e8dec9dddafd95c5418eb14f66590d7 100644 (file)
--- a/sym.c
+++ b/sym.c
@@ -134,7 +134,8 @@ int table_size;
        {
        static struct hash_entry empty_entry =
                {
-               (struct hash_entry *) 0, (struct hash_entry *) 0, NULL, NULL, 0,
+               (struct hash_entry *) 0, (struct hash_entry *) 0,
+               (char *) 0, (char *) 0, 0,
                } ;
        register struct hash_entry *sym_entry =
                table[hashfunct( sym, table_size )];
@@ -174,14 +175,15 @@ int hash_size;
 
 /* ndinstal - install a name definition */
 
-void ndinstal( nd, def )
-char nd[];
-Char def[];
+void ndinstal( name, definition )
+char name[];
+Char definition[];
        {
        char *copy_string();
        Char *copy_unsigned_string();
 
-       if ( addsym( copy_string( nd ), (char *) copy_unsigned_string( def ), 0,
+       if ( addsym( copy_string( name ),
+                       (char *) copy_unsigned_string( definition ), 0,
                        ndtbl, NAME_TABLE_HASH_SIZE ) )
                synerr( "name defined twice" );
        }