diff options
author | FreeArtMan <dos21h@gmail.com> | 2015-12-17 21:52:25 +0000 |
---|---|---|
committer | FreeArtMan <dos21h@gmail.com> | 2015-12-17 21:52:25 +0000 |
commit | 6e2e285142895f3ed4b7e5b99ff1595092d84969 (patch) | |
tree | d681a1852b4adc8a2540d893d782c5e10ebef84e /dm_parser.c | |
parent | 02496faab558fa758adf3a24006201cf5ab557fb (diff) | |
download | dm-6e2e285142895f3ed4b7e5b99ff1595092d84969.tar.gz dm-6e2e285142895f3ed4b7e5b99ff1595092d84969.zip |
Fixed few warnings
Diffstat (limited to 'dm_parser.c')
-rw-r--r-- | dm_parser.c | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/dm_parser.c b/dm_parser.c index bfd829f..f91eec9 100644 --- a/dm_parser.c +++ b/dm_parser.c @@ -120,7 +120,7 @@ int parse_dm( token_list *tl, const char *str ) { static uint8_t cs; const int stacksize = 10; - int res=0, *top=0, *stack=NULL, act=0; + int res=0, *stack=NULL, act=0; stack = malloc( sizeof(stack)*stacksize ); char *p=(char *)str, *pe = (char *)str + strlen( str ), *eof=NULL; char *ts, *te = 0; @@ -128,13 +128,9 @@ int parse_dm( token_list *tl, const char *str ) /* variables used in state machine */ - char *token_s=NULL, *token_e=NULL; - char *value_s=NULL, *value_e=NULL; - int token_type=0; - int dm_current_tok = TOK_NONE; -#line 138 "dm_parser.c" +#line 134 "dm_parser.c" { cs = dm_start; ts = 0; @@ -142,9 +138,9 @@ int parse_dm( token_list *tl, const char *str ) act = 0; } -#line 83 "dm_parser.ragel" +#line 79 "dm_parser.ragel" -#line 148 "dm_parser.c" +#line 144 "dm_parser.c" { int _klen; unsigned int _trans; @@ -165,7 +161,7 @@ _resume: #line 1 "NONE" {ts = p;} break; -#line 169 "dm_parser.c" +#line 165 "dm_parser.c" } } @@ -275,7 +271,7 @@ _eof_trans: #line 54 "dm_parser.ragel" {{p = ((te))-1;}{/*printf("int = ");fwrite(ts,1,te-ts,stdout);printf("\n");*/TADD(TOK_INT,ts,te);}} break; -#line 279 "dm_parser.c" +#line 275 "dm_parser.c" } } @@ -288,7 +284,7 @@ _again: #line 1 "NONE" {ts = 0;} break; -#line 292 "dm_parser.c" +#line 288 "dm_parser.c" } } @@ -308,7 +304,7 @@ _again: _out: {} } -#line 84 "dm_parser.ragel" +#line 80 "dm_parser.ragel" if ( cs == dm_error ) { |