Text   |  XML   |  ReML   |   Visible Warnings:

Unreachable Call  at rtp_stream_dlg.c:94

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

add_to_clist

(/home/sate/Testcases/c/cve/wireshark-1.2.0/gtk/rtp_stream_dlg.c)expand/collapse
Show more  
 82  static void add_to_clist(rtp_stream_info_t* strinfo)
 83  {
 84          gchar label_text[256];
 85          gint added_row;
 86          gchar *data[NUM_COLS];
 87          guint32 expected;
 88          gint32 lost;
 89          double perc;
 90          int i;
 91          char *savelocale;
 92   
 93          /* save the current locale */
 94          savelocale = setlocale(LC_NUMERIC, NULL);
 95          /* switch to "C" locale to avoid problems with localized decimal separators
 96                  in g_snprintf("%f") functions */
 97          setlocale(LC_NUMERIC, "C");
 98   
 99          data[0] = g_strdup(get_addr_name(&(strinfo->src_addr)));
 100          data[1] = g_strdup_printf("%u", strinfo->src_port);
 101          data[2] = g_strdup(get_addr_name(&(strinfo->dest_addr)));
 102          data[3] = g_strdup_printf("%u", strinfo->dest_port);
 103          data[4] = g_strdup_printf("0x%X", strinfo->ssrc);
 104          if(strinfo->pt>95){
 105                  if(strinfo->info_payload_type_str != NULL){
 106                          data[5] = g_strdup(strinfo->info_payload_type_str);
 107                  }else{
 108                          data[5] = g_strdup_printf("Unknown(%u)",strinfo->pt);
 109                  }
 110   
 111          }else{
 112                  data[5] = g_strdup(val_to_str(strinfo->pt, rtp_payload_type_vals,
 113                          "Unknown (%u)"));
 114          }
 115          data[6] = g_strdup_printf("%u", strinfo->npackets);
 116   
 117          expected = (strinfo->rtp_stats.stop_seq_nr + strinfo->rtp_stats.cycles*65536)
 118                  - strinfo->rtp_stats.start_seq_nr + 1;
 119          lost = expected - strinfo->rtp_stats.total_nr;
 120          if (expected){
 121                  perc = (double)(lost*100)/(double)expected;
 122          } else {
 123                  perc = 0;
 124          }
 125          data[7] = g_strdup_printf("%d (%.1f%%)", lost, perc);
 126          data[8] = g_strdup_printf("%.2f", strinfo->rtp_stats.max_delta);
 127          data[9] = g_strdup_printf("%.2f", strinfo->rtp_stats.max_jitter);
 128          data[10] = g_strdup_printf("%.2f", strinfo->rtp_stats.mean_jitter);
 129          if (strinfo->problem)
 130                  data[11] = g_strdup("X");
 131          else 
 132                  data[11] = g_strdup("");
 133   
 134          /* restore previous locale setting */
 135          setlocale(LC_NUMERIC, savelocale);
 136   
 137          added_row = gtk_clist_append(GTK_CLIST(clist), data);
 138          for (i = 0; i < NUM_COLS; i++)
 139                  g_free(data[i]);
 140   
 141          /* set data pointer of last row to point to user data for that row */
 142          gtk_clist_set_row_data(GTK_CLIST(clist), added_row, strinfo);
 143   
 144          /* Update the top label with the number of detected streams */
 145          g_snprintf(label_text, sizeof(label_text),
 146                  "Detected %d RTP streams. Choose one for forward and reverse direction for analysis",
 147                  ++streams_nb);
 148           gtk_label_set_text(GTK_LABEL(top_label), label_text);
 149  }
Show more  




Change Warning 4194.30837 : Unreachable Call

Because they are very similar, this warning shares annotations with warning 4194.30843.

Priority:
State:
Finding:
Owner:
Note: