Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Control Flow  at k12text.c:1292

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

K12Text_lex

(/home/sate/Testcases/c/cve/wireshark-1.2.0/wiretap/k12text.c)expand/collapse
Show more  
 1113  YY_DECL 
 1114  {
 1115          register yy_state_type yy_current_state;
 1116          register char *yy_cp, *yy_bp;
 1117          register int yy_act;
 1118       
 1119  #line 134 "k12text.l"
 1120   
 1121  #line 1122 "k12text.c"
 1122   
 1123          if ( !(yy_init) )
 1124                  {
 1125                  (yy_init) = 1;
 1126   
 1127  #ifdef YY_USER_INIT 
 1128                  YY_USER_INIT;
 1129  #endif
 1130   
 1131                  if ( ! (yy_start) )
 1132                          (yy_start) = 1; /* first start state */
 1133   
 1134                  if ( ! K12Text_in )
 1135                          K12Text_in = stdin;
 1136   
 1137                  if ( ! K12Text_out )
 1138                          K12Text_out = stdout;
 1139   
 1140                  if ( ! YY_CURRENT_BUFFER ) {
 1141                          K12Text_ensure_buffer_stack ();
 1142                          YY_CURRENT_BUFFER_LVALUE =
 1143                                  K12Text__create_buffer(K12Text_in,YY_BUF_SIZE );
 1144                  }
 1145   
 1146                  K12Text__load_buffer_state( );
 1147                  }
 1148   
 1149          while ( 1 )             /* loops until end-of-file is reached */
 1150                  {
 1151                  yy_cp = (yy_c_buf_p);
 1152   
 1153                  /* Support of K12Text_text. */
 1154                  *yy_cp = (yy_hold_char);
 1155   
 1156                  /* yy_bp points to the position in yy_ch_buf of the start of 
 1157                   * the current run.
 1158                   */
 1159                  yy_bp = yy_cp;
 1160   
 1161                  yy_current_state = (yy_start);
 1162  yy_match:
 1163                  do 
 1164                          {
 1165                          register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)];
 1166                          if ( yy_accept[yy_current_state] )
 1167                                  {
 1168                                  (yy_last_accepting_state) = yy_current_state;
 1169                                  (yy_last_accepting_cpos) = yy_cp;
 1170                                  }
 1171                          while ( yy_chk[yy_base[yy_current_state] + yy_c] != yy_current_state )
 1172                                  {
 1173                                  yy_current_state = (int) yy_def[yy_current_state];
 1174                                  if ( yy_current_state >= 509 )
 1175                                          yy_c = yy_meta[(unsigned int) yy_c];
 1176                                  }
 1177                          yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c];
 1178                          ++yy_cp;
 1179                          }
 1180                  while ( yy_current_state != 508 );
 1181                  yy_cp = (yy_last_accepting_cpos);
 1182                  yy_current_state = (yy_last_accepting_state);
 1183   
 1184  yy_find_action:
 1185                  yy_act = yy_accept[yy_current_state];
 1186   
 1187                  YY_DO_BEFORE_ACTION;
 1188   
 1189  do_action:      /* This label is used only to access EOF actions. */
 1190   
 1191                  switch ( yy_act )
 1192          { /* beginning of action switch */
 1193                          case 0: /* must back up */
 1194                          /* undo the effects of YY_DO_BEFORE_ACTION */
 1195                          *yy_cp = (yy_hold_char);
 1196                          yy_cp = (yy_last_accepting_cpos);
 1197                          yy_current_state = (yy_last_accepting_state);
 1198                          goto yy_find_action;
 1199   
 1200  case 1:
 1201  YY_RULE_SETUP 
 1202  #line 135 "k12text.l"
 1203  { is_k12text = TRUE; yyterminate(); }
 1204          YY_BREAK 
 1205  case 2:
 1206  YY_RULE_SETUP 
 1207  #line 137 "k12text.l"
 1208  { if (++ junk_chars > MAX_JUNK) { is_k12text = FALSE;  yyterminate(); } }
 1209          YY_BREAK 
 1210  case 3:
 1211  YY_RULE_SETUP 
 1212  #line 139 "k12text.l"
 1213  {BEGIN(HOURS); }
 1214          YY_BREAK 
 1215  case 4:
 1216  YY_RULE_SETUP 
 1217  #line 140 "k12text.l"
 1218  { SET_HOURS(K12Text_text); BEGIN(MINUTES); }
 1219          YY_BREAK 
 1220  case 5:
 1221  YY_RULE_SETUP 
 1222  #line 141 "k12text.l"
 1223  { SET_MINUTES(K12Text_text); BEGIN(M2S);}
 1224          YY_BREAK 
 1225  case 6:
 1226  YY_RULE_SETUP 
 1227  #line 142 "k12text.l"
 1228  { BEGIN(SECONDS);}
 1229          YY_BREAK 
 1230  case 7:
 1231  YY_RULE_SETUP 
 1232  #line 143 "k12text.l"
 1233  { SET_SECONDS(K12Text_text); BEGIN(S2M); }
 1234          YY_BREAK 
 1235  case 8:
 1236  YY_RULE_SETUP 
 1237  #line 144 "k12text.l"
 1238  { BEGIN(MS); }
 1239          YY_BREAK 
 1240  case 9:
 1241  YY_RULE_SETUP 
 1242  #line 145 "k12text.l"
 1243  { SET_MS(K12Text_text); BEGIN(M2N);  }
 1244          YY_BREAK 
 1245  case 10:
 1246  YY_RULE_SETUP 
 1247  #line 146 "k12text.l"
 1248  { BEGIN(NS); }
 1249          YY_BREAK 
 1250  case 11:
 1251  YY_RULE_SETUP 
 1252  #line 147 "k12text.l"
 1253  { SET_NS(K12Text_text); BEGIN(ENCAP);}
 1254          YY_BREAK 
 1255  case 12:
 1256  YY_RULE_SETUP 
 1257  #line 148 "k12text.l"
 1258  {encap = WTAP_ENCAP_ETHERNET; BEGIN(STARTBYTES); }
 1259          YY_BREAK 
 1260  /* <ENCAP>{mtp2} {encap = WTAP_ENCAP_MTP2; BEGIN(STARTBYTES); }      Not supported as yet */
 1261  /* <ENCAP>{sscop} {encap = WTAP_ENCAP_ATM_PDUS; BEGIN(STARTBYTES); } Not supported as yet */
 1262  case 13:
 1263  YY_RULE_SETUP 
 1264  #line 151 "k12text.l"
 1265  {encap = WTAP_ENCAP_MTP3; BEGIN(STARTBYTES); }
 1266          YY_BREAK 
 1267  case 14:
 1268  YY_RULE_SETUP 
 1269  #line 152 "k12text.l"
 1270  {encap = WTAP_ENCAP_CHDLC; BEGIN(STARTBYTES); }
 1271          YY_BREAK 
 1272  case 15:
 1273  YY_RULE_SETUP 
 1274  #line 153 "k12text.l"
 1275  { BEGIN(BYTE); }
 1276          YY_BREAK 
 1277  case 16:
 1278  YY_RULE_SETUP 
 1279  #line 154 "k12text.l"
 1280  { ADD_BYTE(K12Text_text); }
 1281          YY_BREAK 
 1282  case 17:
 1283  YY_RULE_SETUP 
 1284  #line 155 "k12text.l"
 1285  ;
 1286          YY_BREAK 
 1287  case 18:
 1288  /* rule 18 can match eol */
 1289  YY_RULE_SETUP 
 1290  #line 156 "k12text.l"
 1291  { FINALIZE_FRAME(); yyterminate(); }
 1292          YY_BREAK 
 1293  case 19:
 1294  YY_RULE_SETUP 
 1295  #line 158 "k12text.l"
 1296  {  if (++junk_chars > MAX_JUNK) { KERROR("too much junk");  } }
 1297          YY_BREAK 
 1298  case YY_STATE_EOF(INITIAL):
 1299  case YY_STATE_EOF(MAGIC):
 1300  case YY_STATE_EOF(NEXT_FRAME):
 1301  case YY_STATE_EOF(HOURS):
 1302  case YY_STATE_EOF(MINUTES):
 1303  case YY_STATE_EOF(M2S):
 1304  case YY_STATE_EOF(SECONDS):
 1305  case YY_STATE_EOF(S2M):
 1306  case YY_STATE_EOF(MS):
 1307  case YY_STATE_EOF(M2N):
 1308  case YY_STATE_EOF(NS):
 1309  case YY_STATE_EOF(ENCAP):
 1310  case YY_STATE_EOF(STARTBYTES):
 1311  case YY_STATE_EOF(BYTE):
 1312  #line 159 "k12text.l"
 1313  { at_eof = TRUE; yyterminate(); }
 1314          YY_BREAK 
 1315  case 20:
 1316  YY_RULE_SETUP 
 1317  #line 161 "k12text.l"
 1318  ECHO;
 1319          YY_BREAK 
 1320  #line 1321 "k12text.c"
 1321   
 1322          case YY_END_OF_BUFFER:
 1323                  {
 1324                  /* Amount of text matched not including the EOB char. */
 1325                  int yy_amount_of_matched_text = (int) (yy_cp - (yytext_ptr)) - 1;
 1326   
 1327                  /* Undo the effects of YY_DO_BEFORE_ACTION. */
 1328                  *yy_cp = (yy_hold_char);
 1329                  YY_RESTORE_YY_MORE_OFFSET 
 1330   
 1331                  if ( YY_CURRENT_BUFFER_LVALUE->yy_buffer_status == YY_BUFFER_NEW )
 1332                          {
 1333                          /* We're scanning a new file or input source.  It's
 1334                           * possible that this happened because the user 
 1335                           * just pointed K12Text_in at a new source and called 
 1336                           * K12Text_lex().  If so, then we have to assure 
 1337                           * consistency between YY_CURRENT_BUFFER and our 
 1338                           * globals.  Here is the right place to do so, because 
 1339                           * this is the first action (other than possibly a 
 1340                           * back-up) that will match for the new input source.
 1341                           */
 1342                          (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_n_chars;
 1343                          YY_CURRENT_BUFFER_LVALUE->yy_input_file = K12Text_in;
 1344                          YY_CURRENT_BUFFER_LVALUE->yy_buffer_status = YY_BUFFER_NORMAL;
 1345                          }
 1346   
 1347                  /* Note that here we test for yy_c_buf_p "<=" to the position 
 1348                   * of the first EOB in the buffer, since yy_c_buf_p will 
 1349                   * already have been incremented past the NUL character
 1350                   * (since all states make transitions on EOB to the
 1351                   * end-of-buffer state).  Contrast this with the test
 1352                   * in input().
 1353                   */
 1354                  if ( (yy_c_buf_p) <= &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)] )
 1355                          { /* This was really a NUL. */
 1356                          yy_state_type yy_next_state;
 1357   
 1358                          (yy_c_buf_p) = (yytext_ptr) + yy_amount_of_matched_text;
 1359   
 1360                          yy_current_state = yy_get_previous_state(  );
 1361   
 1362                          /* Okay, we're now positioned to make the NUL
 1363                           * transition.  We couldn't have 
 1364                           * yy_get_previous_state() go ahead and do it 
 1365                           * for us because it doesn't know how to deal
 1366                           * with the possibility of jamming (and we don't
 1367                           * want to build jamming into it because then it 
 1368                           * will run more slowly).
 1369                           */
 1370   
 1371                          yy_next_state = yy_try_NUL_trans( yy_current_state );
 1372   
 1373                          yy_bp = (yytext_ptr) + YY_MORE_ADJ;
 1374   
 1375                          if ( yy_next_state )
 1376                                  {
 1377                                  /* Consume the NUL. */
 1378                                  yy_cp = ++(yy_c_buf_p);
 1379                                  yy_current_state = yy_next_state;
 1380                                  goto yy_match;
 1381                                  }
 1382   
 1383                          else 
 1384                                  {
 1385                                  yy_cp = (yy_last_accepting_cpos);
 1386                                  yy_current_state = (yy_last_accepting_state);
 1387                                  goto yy_find_action;
 1388                                  }
 1389                          }
 1390   
 1391                  else switch ( yy_get_next_buffer(  ) )
 1392                          {
 1393                          case EOB_ACT_END_OF_FILE:
 1394                                  {
 1395                                  (yy_did_buffer_switch_on_eof) = 0;
 1396   
 1397                                  if ( K12Text_wrap( ) )
 1398                                          {
 1399                                          /* Note: because we've taken care in 
 1400                                           * yy_get_next_buffer() to have set up
 1401                                           * K12Text_text, we can now set up 
 1402                                           * yy_c_buf_p so that if some total
 1403                                           * hoser (like flex itself) wants to
 1404                                           * call the scanner after we return the 
 1405                                           * YY_NULL, it'll still work - another 
 1406                                           * YY_NULL will get returned.
 1407                                           */
 1408                                          (yy_c_buf_p) = (yytext_ptr) + YY_MORE_ADJ;
 1409   
 1410                                          yy_act = YY_STATE_EOF(YY_START);
 1411                                          goto do_action;
 1412                                          }
 1413   
 1414                                  else 
 1415                                          {
 1416                                          if ( ! (yy_did_buffer_switch_on_eof) )
 1417                                                  YY_NEW_FILE;
 1418                                          }
 1419                                  break;
 1420                                  }
 1421   
 1422                          case EOB_ACT_CONTINUE_SCAN:
 1423                                  (yy_c_buf_p) =
 1424                                          (yytext_ptr) + yy_amount_of_matched_text;
 1425   
 1426                                  yy_current_state = yy_get_previous_state(  );
 1427   
 1428                                  yy_cp = (yy_c_buf_p);
 1429                                  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
 1430                                  goto yy_match;
 1431   
 1432                          case EOB_ACT_LAST_MATCH:
 1433                                  (yy_c_buf_p) =
 1434                                  &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars)];
 1435   
 1436                                  yy_current_state = yy_get_previous_state(  );
 1437   
 1438                                  yy_cp = (yy_c_buf_p);
 1439                                  yy_bp = (yytext_ptr) + YY_MORE_ADJ;
 1440                                  goto yy_find_action;
 1441                          }
 1442                  break;
 1443                  }
 1444   
 1445          default:
 1446                  YY_FATAL_ERROR(
 1447                          "fatal flex scanner internal error--no action found" );
 1448          } /* end of action switch */
 1449                  } /* end of scanning one token */
 1450  } /* end of K12Text_lex */
Show more  




Change Warning 1079.30393 : Unreachable Control Flow

Because they are very similar, this warning shares annotations with warnings 1079.30394 and 1079.30395.

Priority:
State:
Finding:
Owner:
Note: