From 48c3fab8b30abe23bf8ec8e9249d322171abef91 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Sat, 27 Mar 2010 06:47:47 +0000 Subject: [PATCH] Squelch some compiler warnings. svn path=/trunk/; revision=32305 --- tap-sctpchunkstat.c | 6 +++--- tap-stats_tree.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/tap-sctpchunkstat.c b/tap-sctpchunkstat.c index eb2b5e6fb6..5730395d0a 100644 --- a/tap-sctpchunkstat.c +++ b/tap-sctpchunkstat.c @@ -106,7 +106,7 @@ sctpstat_reset(void *phs) static sctp_ep_t* -alloc_sctp_ep(struct _sctp_info *si) +alloc_sctp_ep(const struct _sctp_info *si) { sctp_ep_t* ep; guint16 chunk_type; @@ -136,7 +136,7 @@ sctpstat_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, cons sctpstat_t *hs=(sctpstat_t *)phs; sctp_ep_t *tmp = NULL, *te = NULL; - struct _sctp_info *si = (struct _sctp_info *) phi; + const struct _sctp_info *si = (const struct _sctp_info *) phi; guint32 tvb_number; guint8 chunk_type; @@ -223,7 +223,7 @@ sctpstat_init(const char *optarg, void* userdata _U_) sctpstat_t *hs; GString *error_string; - hs = g_malloc(sizeof(sctpstat_t)); + hs = (sctpstat_t *)g_malloc(sizeof(sctpstat_t)); if(!strncmp(optarg,"sctp,stat,",11)){ hs->filter=g_strdup(optarg+11); } else { diff --git a/tap-stats_tree.c b/tap-stats_tree.c index 350d4ace49..04981d38b1 100644 --- a/tap-stats_tree.c +++ b/tap-stats_tree.c @@ -50,7 +50,7 @@ struct _tree_cfg_pres { static void draw_stats_tree(void *psp) { - stats_tree *st = psp; + stats_tree *st = (stats_tree *)psp; GString *s; gchar *fmt; stat_node *child; @@ -84,7 +84,7 @@ init_stats_tree(const char *optarg, void *userdata _U_) if (cfg != NULL) { if (strncmp (optarg, cfg->pr->init_string, strlen(cfg->pr->init_string)) == 0){ - st = stats_tree_new(cfg,NULL,(char*)(optarg)+strlen(cfg->pr->init_string)); + st = stats_tree_new(cfg,NULL,optarg+strlen(cfg->pr->init_string)); } else { report_failure("Wrong stats_tree (%s) found when looking at ->init_string",abbr); return; @@ -121,9 +121,9 @@ init_stats_tree(const char *optarg, void *userdata _U_) void register_stats_tree_tap (gpointer k _U_, gpointer v, gpointer p _U_) { - stats_tree_cfg *cfg = v; + stats_tree_cfg *cfg = (stats_tree_cfg *)v; - cfg->pr = g_malloc(sizeof(tree_cfg_pres)); + cfg->pr = (tree_cfg_pres *)g_malloc(sizeof(tree_cfg_pres)); cfg->pr->init_string = g_strdup_printf("%s,tree", cfg->abbr); register_stat_cmd_arg(cfg->pr->init_string, init_stats_tree, NULL);