Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Data Flow  at mate_grammar.c:2457

No properties have been set. | edit properties
Jump to warning location ↓ warning details...
Show Events | Options

MateParser

(/home/sate/Testcases/c/cve/wireshark-1.2.0/plugins/mate/mate_grammar.c)expand/collapse
Show more  
 2352  void MateParser(
 2353    void *yyp,                   /* The parser */
 2354    int yymajor,                 /* The major token code number */
 2355    MateParserTOKENTYPE yyminor       /* The value for the token */
 2356    MateParserARG_PDECL               /* Optional %extra_argument parameter */
 2357  ){
 2358    YYMINORTYPE yyminorunion;
 2359    int yyact;            /* The parser action. */
 2360    int yyendofinput;     /* True if we are at the end of input */
 2361  #ifdef YYERRORSYMBOL 
 2362     int yyerrorhit = 0;   /* True if yymajor has invoked an error */
 2363  #endif
 2364    yyParser *yypParser;  /* The parser */
 2365   
 2366    /* (re)initialize the parser, if necessary */
 2367    yypParser = (yyParser*)yyp;
 2368    if( yypParser->yyidx<0 ){
 2369  #if YYSTACKDEPTH<=0
 2370      if( yypParser->yystksz <=0 ){
 2371        /*memset(&yyminorunion, 0, sizeof(yyminorunion));*/
 2372        yyminorunion = yyzerominor;
 2373         yyStackOverflow(yypParser, &yyminorunion);
 2374        return;
 2375      }
 2376  #endif
 2377      yypParser->yyidx = 0;
 2378      yypParser->yyerrcnt = -1;
 2379      yypParser->yystack[0].stateno = 0;
 2380      yypParser->yystack[0].major = 0;
 2381    }
 2382    yyminorunion.yy0 = yyminor;
 2383    yyendofinput = (yymajor==0);
 2384    MateParserARG_STORE;
 2385   
 2386  #ifndef NDEBUG 
 2387    if( yyTraceFILE ){
 2388      fprintf(yyTraceFILE,"%sInput %s\n",yyTracePrompt,yyTokenName[yymajor]);
 2389    }
 2390  #endif
 2391   
 2392    do{
 2393      yyact = yy_find_shift_action(yypParser,(YYCODETYPE)yymajor);
 2394      if( yyact<YYNSTATE ){
 2395            assert( !yyendofinput );  /* Impossible to shift the $ token */
 2396        yy_shift(yypParser,yyact,yymajor,&yyminorunion);
 2397        yypParser->yyerrcnt--;
 2398            yymajor = YYNOCODE;
 2399      }else if( yyact < YYNSTATE + YYNRULE ){
 2400        yy_reduce(yypParser,yyact-YYNSTATE);
 2401      }else{
 2402  #ifdef YYERRORSYMBOL 
 2403        int yymx;
 2404  #endif
 2405        assert( yyact == YY_ERROR_ACTION );
 2406  #ifndef NDEBUG 
 2407        if( yyTraceFILE ){
 2408          fprintf(yyTraceFILE,"%sSyntax Error!\n",yyTracePrompt);
 2409        }
 2410  #endif
 2411  #ifdef YYERRORSYMBOL 
 2412        /* A syntax error has occurred.
 2413        ** The response to an error depends upon whether or not the 
 2414        ** grammar defines an error token "ERROR".
 2415        **
 2416        ** This is what we do if the grammar does define ERROR:
 2417        **
 2418        **  * Call the %syntax_error function.
 2419        **
 2420        **  * Begin popping the stack until we enter a state where
 2421        **    it is legal to shift the error symbol, then shift
 2422        **    the error symbol.
 2423        **
 2424        **  * Set the error count to three.
 2425        **
 2426        **  * Begin accepting and shifting new tokens.  No new error
 2427        **    processing will occur until three tokens have been 
 2428        **    shifted successfully.
 2429        **
 2430        */
 2431        if( yypParser->yyerrcnt<0 ){
 2432          yy_syntax_error(yypParser,yymajor,yyminorunion);
 2433        }
 2434        yymx = yypParser->yystack[yypParser->yyidx].major;
 2435        if( yymx==YYERRORSYMBOL || yyerrorhit ){
 2436  #ifndef NDEBUG 
 2437          if( yyTraceFILE ){
 2438            fprintf(yyTraceFILE,"%sDiscard input token %s\n",
 2439               yyTracePrompt,yyTokenName[yymajor]);
 2440          }
 2441  #endif
 2442          yy_destructor((YYCODETYPE)yymajor,&yyminorunion);
 2443          yymajor = YYNOCODE;
 2444        }else{
 2445           while(
 2446            yypParser->yyidx >= 0 &&
 2447            yymx != YYERRORSYMBOL &&
 2448            (yyact = yy_find_reduce_action(
 2449                          yypParser->yystack[yypParser->yyidx].stateno,
 2450                          YYERRORSYMBOL)) >= YYNSTATE 
 2451                    ){
 2452            yy_pop_parser_stack(yypParser);
 2453          }
 2454          if( yypParser->yyidx < 0 || yymajor==0 ){
 2455            yy_destructor((YYCODETYPE)yymajor,&yyminorunion);
 2456            yy_parse_failed(yypParser);
 2457            yymajor = YYNOCODE;
 2458          }else if( yymx!=YYERRORSYMBOL ){
 2459            YYMINORTYPE u2;
 2460            u2.YYERRSYMDT = 0;
 2461            yy_shift(yypParser,yyact,YYERRORSYMBOL,&u2);
 2462          }
 2463        }
 2464        yypParser->yyerrcnt = 3;
 2465        yyerrorhit = 1;
 2466  #else  /* YYERRORSYMBOL is not defined */
 2467        /* This is what we do if the grammar does not define ERROR:
 2468        **
 2469        **  * Report an error message, and throw away the input token.
 2470        **
 2471        **  * If the input token is $, then fail the parse.
 2472        **
 2473        ** As before, subsequent error messages are suppressed until
 2474        ** three input tokens have been successfully shifted.
 2475        */
 2476        if( yypParser->yyerrcnt<=0 ){
 2477          yy_syntax_error(yypParser,yymajor,yyminorunion);
 2478        }
 2479        yypParser->yyerrcnt = 3;
 2480        yy_destructor((YYCODETYPE)yymajor,&yyminorunion);
 2481        if( yyendofinput ){
 2482          yy_parse_failed(yypParser);
 2483        }
 2484        yymajor = YYNOCODE;
 2485  #endif
 2486      }
 2487    }while( yymajor!=YYNOCODE && yypParser->yyidx>=0 );
 2488    return;
 2489  }
Show more  




Change Warning 3736.30594 : Unreachable Data Flow

Priority:
State:
Finding:
Owner:
Note: