removed some MSVC warnings (level 3)
authorulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 5 Jan 2004 18:11:28 +0000 (18:11 +0000)
committerulfl <ulfl@f5534014-38df-0310-8fa8-9805f1628bb7>
Mon, 5 Jan 2004 18:11:28 +0000 (18:11 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@9560 f5534014-38df-0310-8fa8-9805f1628bb7

epan/resolv.c
gtk/capture_info_dlg.c
gtk/io_stat.c
gtk/progress_dlg.c
gtk/tcp_graph.c

index 4a70b0c4ab7fbdb4723d613d1c151a159257ddeb..6587fc8121093baff345d2f60cabd1b0e314dedf 100644 (file)
@@ -1,7 +1,7 @@
 /* resolv.c
  * Routines for network object lookup
  *
- * $Id: resolv.c,v 1.39 2003/12/09 05:06:22 guy Exp $
+ * $Id: resolv.c,v 1.40 2004/01/05 18:10:02 ulfl Exp $
  *
  * Laurent Deniel <laurent.deniel@free.fr>
  *
@@ -535,7 +535,7 @@ parse_ether_address(const char *cp, ether_t *eth, unsigned int *mask,
       return FALSE;    /* failed */
     if (num > 0xFF)
       return FALSE;    /* not a valid octet */
-    eth->addr[i] = num;
+    eth->addr[i] = (guint8) num;
     cp = p;            /* skip past the number */
 
     /* OK, what character terminated the octet? */
index 298f9d57672153d4cc4c6926a2b08d0c0a61272d..400907c90f052bdd892de430fae1301df34fc5b2 100644 (file)
@@ -1,7 +1,7 @@
 /* capture_info_dlg.c
  * Routines for packet capture info dialog
  *
- * $Id: capture_info_dlg.c,v 1.8 2003/12/21 12:17:59 ulfl Exp $
+ * $Id: capture_info_dlg.c,v 1.9 2004/01/05 18:11:27 ulfl Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -256,7 +256,7 @@ capture_info    *cinfo)
         /* don't try to update the "total" row progress bar */
         if (i != 0) {
             gtk_progress_bar_update(GTK_PROGRESS_BAR(info->counts[i].percent_pb),
-                     pct(*info->counts[i].value_ptr, *info->counts[0].value_ptr) / 100.0);
+                     (gfloat) (pct(*info->counts[i].value_ptr, *info->counts[0].value_ptr) / 100.0));
         }
 
         g_snprintf(label_str, sizeof(label_str), "%.1f%%",
index 2037ffe378429a45b4d394a53e9e09c4d3a9ccee..0478243a36d2a3596daf71f9514c13aea49aee2b 100644 (file)
@@ -1,7 +1,7 @@
 /* io_stat.c
  * io_stat   2002 Ronnie Sahlberg
  *
- * $Id: io_stat.c,v 1.53 2004/01/03 18:05:56 sharpe Exp $
+ * $Id: io_stat.c,v 1.54 2004/01/05 18:11:27 ulfl Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -249,7 +249,7 @@ gtk_iostat_packet(void *g, packet_info *pinfo, epan_dissect_t *edt, void *dummy
        }
 
        /* update num_items */
-       if(idx>git->io->num_items){
+       if((guint32)idx > git->io->num_items){
                git->io->num_items=idx;
                git->io->max_interval=idx*git->io->interval;
        }
@@ -337,7 +337,7 @@ gtk_iostat_packet(void *g, packet_info *pinfo, epan_dissect_t *edt, void *dummy
                                                }
                                                i--;
                                                t-=pt;
-                                               if(t>(git->io->interval*1000)){
+                                               if(t > (guint32) (git->io->interval*1000)){
                                                        pt=git->io->interval*1000;
                                                } else {
                                                        pt=t;
@@ -559,7 +559,7 @@ gtk_iostat_draw(void *g)
                if(!io->graphs[i].display){
                        continue;
                }
-               for(idx=0;idx<num_time_intervals;idx++){
+               for(idx=0;(guint32) (idx) < num_time_intervals;idx++){
                        guint32 val;
 
                        val=get_it_value(io, i, idx);
index 35b41896730b7aefd2439a8179ca10e289c92d7b..64146bb53e1310e64d229889956f4feaf62dbd1a 100644 (file)
@@ -1,7 +1,7 @@
 /* progress_dlg.c
  * Routines for progress-bar (modal) dialog
  *
- * $Id: progress_dlg.c,v 1.19 2004/01/02 13:27:00 ulfl Exp $
+ * $Id: progress_dlg.c,v 1.20 2004/01/05 18:11:28 ulfl Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -230,8 +230,8 @@ delayed_create_progress_dlg(const gchar *task_title, const gchar *item_title,
                            const GTimeVal *start_time, gfloat progress)
 {
     GTimeVal    time_now;
-    gfloat      delta_time;
-    gfloat      min_display;
+    gdouble     delta_time;
+    gdouble     min_display;
     progdlg_t  *dlg;
 
 #define INIT_DELAY          0.1 * 1e6
@@ -329,7 +329,7 @@ update_progress_dlg(progdlg_t *dlg, gfloat percentage, gchar *status)
        GtkWidget *dlg_w = dlg->dlg_w;
        GtkWidget *prog_bar;
        GTimeVal   time_now;
-       gfloat     delta_time;
+       gdouble    delta_time;
        gulong     ul_left;
        gulong     ul_elapsed;
        gulong     ul_percentage;
index 9075582033a070c95213da1e38103a5d7ff9ceba..666589d4b8395ba03df9640f0266b46d21d129f6 100644 (file)
@@ -3,7 +3,7 @@
  * By Pavel Mores <pvl@uh.cz>
  * Win32 port:  rwh@unifiedtech.com
  *
- * $Id: tcp_graph.c,v 1.40 2003/12/23 00:16:46 ulfl Exp $
+ * $Id: tcp_graph.c,v 1.41 2004/01/05 18:11:28 ulfl Exp $
  *
  * Ethereal - Network traffic analyzer
  * By Gerald Combs <gerald@ethereal.com>
@@ -1209,20 +1209,20 @@ static void callback_zoom_step (GtkWidget *spin, gpointer data)
        *zoom_this = value;
        if (g->zoom.flags & ZOOM_STEPS_SAME) {
                *zoom_other = value;
-               gtk_spin_button_set_value (widget_other, *zoom_other);
+               gtk_spin_button_set_value (widget_other, (gfloat) *zoom_other);
        } else if (g->zoom.flags & ZOOM_STEPS_KEEP_RATIO) {
                double old_other = *zoom_other;
                *zoom_other *= value / old_this;
                if (*zoom_other < 1.0) {
                        *zoom_other = 1.0;
                        *zoom_this = old_this * 1.0 / old_other;
-                       gtk_spin_button_set_value (widget_this, *zoom_this);
+                       gtk_spin_button_set_value (widget_this, (gfloat) *zoom_this);
                } else if (*zoom_other > 5.0) {
                        *zoom_other = 5.0;
                        *zoom_this = old_this * 5.0 / old_other;
-                       gtk_spin_button_set_value (widget_this, *zoom_this);
+                       gtk_spin_button_set_value (widget_this, (gfloat) *zoom_this);
                }
-               gtk_spin_button_set_value (widget_other, *zoom_other);
+               gtk_spin_button_set_value (widget_other, (gfloat) *zoom_other);
        }
 }
 
@@ -1411,7 +1411,7 @@ static void callback_mag_zoom (GtkWidget *spin, gpointer data)
        if (g->magnify.flags & MAGZOOMS_SAME) {
                *zoom_other = value;
                /* g->magnify.flags |= MAGZOOMS_IGNORE; */
-               gtk_spin_button_set_value (widget_other, *zoom_other);
+               gtk_spin_button_set_value (widget_other, (gfloat) *zoom_other);
        } else if (g->magnify.flags & MAGZOOMS_SAME_RATIO) {
                double old_other = *zoom_other;
                *zoom_other *= value / old_this;
@@ -1419,15 +1419,15 @@ static void callback_mag_zoom (GtkWidget *spin, gpointer data)
                        *zoom_other = 1.0;
                        *zoom_this = old_this * 1.0 / old_other;
                        /* g->magnify.flags |= MAGZOOMS_IGNORE; */
-                       gtk_spin_button_set_value (widget_this, *zoom_this);
+                       gtk_spin_button_set_value (widget_this, (gfloat) *zoom_this);
                } else if (*zoom_other > 25.0) {
                        *zoom_other = 25.0;
                        *zoom_this = old_this * 25.0 / old_other;
                        /* g->magnify.flags |= MAGZOOMS_IGNORE; */
-                       gtk_spin_button_set_value (widget_this, *zoom_this);
+                       gtk_spin_button_set_value (widget_this, (gfloat) *zoom_this);
                }
                /* g->magnify.flags |= MAGZOOMS_IGNORE; */
-               gtk_spin_button_set_value (widget_other, *zoom_other);
+               gtk_spin_button_set_value (widget_other, (gfloat) *zoom_other);
        }
 }