From 2890e415bbec3ddad7c0485067dd09f1e503c84f Mon Sep 17 00:00:00 2001 From: Joerg Mayer Date: Sun, 19 Mar 2017 12:26:28 +0100 Subject: Fix various compile warnings turning error on Linux with gcc6 when compiling with HAVE_PCAP_REMOTE (and ENABLE_ECHLD) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: If5524f2d3dcacca9c82a46167480c8436dd8b1b2 Reviewed-on: https://code.wireshark.org/review/20615 Petri-Dish: Jörg Mayer Tested-by: Petri Dish Buildbot Reviewed-by: Jörg Mayer --- ui/recent.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'ui') diff --git a/ui/recent.c b/ui/recent.c index 42d6dc06ba..30c44f485a 100644 --- a/ui/recent.c +++ b/ui/recent.c @@ -404,7 +404,7 @@ void recent_add_remote_host(gchar *host, struct remote_host *rh) static gboolean free_remote_host (gpointer key _U_, gpointer value, gpointer user _U_) { - struct remote_host *rh = value; + struct remote_host *rh = (struct remote_host *) value; g_free (rh->r_host); g_free (rh->remote_port); @@ -424,8 +424,8 @@ recent_remote_host_list_foreach(GHFunc func, gpointer user_data) static void recent_print_remote_host (gpointer key _U_, gpointer value, gpointer user) { - FILE *rf = user; - struct remote_host_info *ri = value; + FILE *rf = (FILE *)user; + struct remote_host_info *ri = (struct remote_host_info *)value; fprintf (rf, RECENT_KEY_REMOTE_HOST ": %s,%s,%d\n", ri->remote_host, ri->remote_port, ri->auth_type); } @@ -462,7 +462,7 @@ capture_remote_combo_add_recent(const gchar *s) { GList *vals = prefs_get_string_list (s); GList *valp = vals; - gint auth_type; + capture_auth auth_type; char *p; struct remote_host *rh; @@ -473,10 +473,10 @@ capture_remote_combo_add_recent(const gchar *s) remote_host_list = g_hash_table_new (g_str_hash, g_str_equal); } - rh = g_malloc (sizeof (*rh)); + rh =(struct remote_host *) g_malloc (sizeof (*rh)); /* First value is the host */ - rh->r_host = g_strdup (valp->data); + rh->r_host = (gchar *)g_strdup ((const gchar *)valp->data); if (strlen(rh->r_host) == 0) { /* Empty remote host */ g_free(rh->r_host); @@ -488,7 +488,7 @@ capture_remote_combo_add_recent(const gchar *s) if (valp) { /* Found value 2, this is the port number */ - rh->remote_port = g_strdup (valp->data); + rh->remote_port = (gchar *)g_strdup ((const gchar *)valp->data); valp = valp->next; } else { /* Did not find a port number */ @@ -497,7 +497,7 @@ capture_remote_combo_add_recent(const gchar *s) if (valp) { /* Found value 3, this is the authentication type */ - auth_type = (gint)strtol(valp->data, &p, 0); + auth_type = (capture_auth)strtol((const gchar *)valp->data, &p, 0); if (p != valp->data && *p == '\0') { rh->auth_type = auth_type; } -- cgit v1.2.1