diff options
author | Stig Bjørlykke <stig@bjorlykke.org> | 2009-10-20 09:31:07 +0000 |
---|---|---|
committer | Stig Bjørlykke <stig@bjorlykke.org> | 2009-10-20 09:31:07 +0000 |
commit | 39c732d8bf70a920f12bc0abb546b33af5f840ae (patch) | |
tree | 91f30d46a40df2038e08099b475c65f613233c76 /tools/lemon | |
parent | 3bb1c2cbd47a5e7b3d9fe5094aaf3f9c8bb1bc56 (diff) |
Removed some redundant prototypes and some shadowed variables.
svn path=/trunk/; revision=30632
Diffstat (limited to 'tools/lemon')
-rw-r--r-- | tools/lemon/lemon.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/tools/lemon/lemon.c b/tools/lemon/lemon.c index cc6b9c0b7c..aefb6db2e2 100644 --- a/tools/lemon/lemon.c +++ b/tools/lemon/lemon.c @@ -74,9 +74,6 @@ extern int access(); static char *msort(char *, char **, int (*)(const void *, const void *)); -static struct action *Action_new(void); -static struct action *Action_sort(struct action *); - /********** From the file "struct.h" *************************************/ /* ** Principal data structures for the LEMON parser generator. @@ -987,7 +984,6 @@ void FindActions(struct lemon *lemp) /* Resolve conflicts */ for(i=0; i<lemp->nstate; i++){ struct action *ap, *nap; - struct state *stp; stp = lemp->sorted[i]; /* assert( stp->ap ); */ stp->ap = Action_sort(stp->ap); @@ -3647,9 +3643,9 @@ void ReportTable( /* Generate the include code, if any */ tplt_print(out,lemp,lemp->include,&lineno); if( mhflag ){ - char *name = file_makename_using_basename(lemp, ".h"); - fprintf(out,"#include \"%s\"\n", name); lineno++; - free(name); + char *makename = file_makename_using_basename(lemp, ".h"); + fprintf(out,"#include \"%s\"\n", makename); lineno++; + free(makename); } tplt_xfer(lemp->name,in,out,&lineno); @@ -3690,7 +3686,6 @@ void ReportTable( } name = lemp->name ? lemp->name : "Parse"; if( lemp->arg && lemp->arg[0] ){ - int i; i = (int) strlen(lemp->arg); while( i>=1 && safe_isspace(lemp->arg[i-1]) ) i--; while( i>=1 && (safe_isalnum(lemp->arg[i-1]) || lemp->arg[i-1]=='_') ) i--; |