summaryrefslogtreecommitdiff
path: root/ui/recent.c
diff options
context:
space:
mode:
authorJoerg Mayer <jmayer@loplof.de>2017-03-19 12:26:28 +0100
committerJörg Mayer <jmayer@loplof.de>2017-03-19 12:27:12 +0000
commit2890e415bbec3ddad7c0485067dd09f1e503c84f (patch)
tree1500c8273b345db49f17b73a987be300290d7662 /ui/recent.c
parent74e793e8bac3013f0474fdf398608ba24506307c (diff)
downloadwireshark-2890e415bbec3ddad7c0485067dd09f1e503c84f.tar.gz
Fix various compile warnings turning error on Linux with gcc6 when
compiling with HAVE_PCAP_REMOTE (and ENABLE_ECHLD) Change-Id: If5524f2d3dcacca9c82a46167480c8436dd8b1b2 Reviewed-on: https://code.wireshark.org/review/20615 Petri-Dish: Jörg Mayer <jmayer@loplof.de> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Jörg Mayer <jmayer@loplof.de>
Diffstat (limited to 'ui/recent.c')
-rw-r--r--ui/recent.c16
1 files changed, 8 insertions, 8 deletions
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;
}