Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Data Flow  at conversations_table.c:434

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

ct_sort_column

(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/conversations_table.c)expand/collapse
Show more  
 368  ct_sort_column(GtkCList *clist, gconstpointer ptr1, gconstpointer ptr2)
 369  {
 370      guint32 idx1, idx2;
 371      conversations_table *ct = g_object_get_data(G_OBJECT(clist), CONV_PTR_KEY);
 372      conv_t *conv1 = NULL;
 373      conv_t *conv2 = NULL;
 374      double duration1, duration2;
 375   
 376      const GtkCListRow *row1 = ptr1;
 377      const GtkCListRow *row2 = ptr2;
 378   
 379      idx1 = GPOINTER_TO_INT(row1->data);
 380      idx2 = GPOINTER_TO_INT(row2->data);
 381   
 382      if (!ct || idx1 >= ct->num_conversations || idx2 >= ct->num_conversations)
 383          return 0;
 384   
 385      conv1 = &ct->conversations[idx1];
 386      conv2 = &ct->conversations[idx2];
 387   
 388      duration1 = nstime_to_sec(&conv1->stop_time) - nstime_to_sec(&conv1->start_time);
 389      duration2 = nstime_to_sec(&conv2->stop_time) - nstime_to_sec(&conv2->start_time);
 390   
 391      switch(clist->sort_column){
 392      case 0: /* Source address */
 393          return(CMP_ADDRESS(&conv1->src_address, &conv2->src_address));
 394      case 2: /* Destination address */
 395          return(CMP_ADDRESS(&conv1->dst_address, &conv2->dst_address));
 396      case 1: /* Source port */
 397          CMP_NUM(conv1->src_port, conv2->src_port);
 398      case 3: /* Destination port */
 399          CMP_NUM(conv1->dst_port, conv2->dst_port);
 400      case 4: /* Packets */
 401          CMP_NUM(conv1->tx_frames+conv1->rx_frames,
 402                  conv2->tx_frames+conv2->rx_frames);
 403      case 5: /* Bytes */
 404          CMP_NUM(conv1->tx_bytes+conv1->rx_bytes,
 405                  conv2->tx_bytes+conv2->rx_bytes);
 406      case 6: /* Packets A->B */
 407          CMP_NUM(conv1->tx_frames, conv2->tx_frames);
 408      case 7: /* Bytes A->B */
 409          CMP_NUM(conv1->tx_bytes, conv2->tx_bytes);
 410      case 8: /* Packets A<-B */
 411          CMP_NUM(conv1->rx_frames, conv2->rx_frames);
 412      case 9: /* Bytes A<-B */
 413          CMP_NUM(conv1->rx_bytes, conv2->rx_bytes);
 414      case 10: /* Start time */
 415          return nstime_cmp(&conv1->start_time, &conv2->start_time);
 416      case 11: /* Duration */
 417          CMP_NUM(duration1, duration2);
 418      case 12: /* bps A->B */
 419          if (duration1 > 0 && conv1->tx_frames > 1 && duration2 > 0 && conv2->tx_frames > 1) {
 420              CMP_NUM((gint64) conv1->tx_bytes / duration1, (gint64) conv2->tx_bytes / duration2);
 421          } else {
 422              CMP_NUM(conv1->tx_bytes, conv2->tx_bytes);
 423          }
 424      case 13: /* bps A<-B */
 425          if (duration1 > 0 && conv1->rx_frames > 1 && duration2 > 0 && conv2->rx_frames > 1) {
 426              CMP_NUM((gint64) conv1->rx_bytes / duration1, (gint64) conv2->rx_bytes / duration2);
 427          } else {
 428              CMP_NUM(conv1->rx_bytes, conv2->rx_bytes);
 429          }
 430      default:
 431          g_assert_not_reached();
 432      }
 433   
 434      return 0;
 435  }
Show more  




Change Warning 4028.29566 : Unreachable Data Flow

Priority:
State:
Finding:
Owner:
Note: