Text   |  XML   |  ReML   |   Visible Warnings:

Redundant Condition  at lemon.c:3228

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

emit_destructor_code

(/home/sate/Testcases/c/cve/wireshark-1.2.0/tools/lemon/lemon.c)expand/collapse
Show more  
 3212  PRIVATE void emit_destructor_code(FILE *out, struct symbol *sp, struct lemon *lemp,
 3213      int *lineno)
 3214  {
 3215   char *cp = 0;
 3216   
 3217   int linecnt = 0;
 3218   if( sp->type==TERMINAL ){
 3219     cp = lemp->tokendest;
 3220     if( cp==0 ) return;
 3221     fprintf(out,"{\n"); (*lineno)++;
 3222   }else if( sp->destructor ){
 3223     cp = sp->destructor;
 3224     fprintf(out,"{\n"); (*lineno)++;
 3225     tplt_linedir(out,sp->destLineno,lemp->outname); (*lineno)++;
 3226   }else if( lemp->vardest ){
 3227     cp = lemp->vardest;
 3228     if( cp==0 ) return;
 3229     fprintf(out,"{\n"); (*lineno)++;
 3230   }else{
 3231     assert( 0 );  /* Cannot happen */
 3232   }
 3233   for(; *cp; cp++){
 3234     if( *cp=='$' && cp[1]=='$' ){
 3235       fprintf(out,"(yypminor->yy%d)",sp->dtnum);
 3236       cp++;
 3237       continue;
 3238     }
 3239     if( *cp=='\n' ) linecnt++;
 3240     fputc(*cp,out);
 3241   }
 3242   (*lineno) += 3 + linecnt;
 3243   fprintf(out,"\n");
 3244   tplt_linedir(out,*lineno,lemp->outname);
 3245   fprintf(out,"}\n");
 3246   return;
 3247  }
Show more  




Change Warning 922.30123 : Redundant Condition

Priority:
State:
Finding:
Owner:
Note: