Squelch some compiler warnings.
authorguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 27 Mar 2010 06:47:47 +0000 (06:47 +0000)
committerguy <guy@f5534014-38df-0310-8fa8-9805f1628bb7>
Sat, 27 Mar 2010 06:47:47 +0000 (06:47 +0000)
git-svn-id: http://anonsvn.wireshark.org/wireshark/trunk@32305 f5534014-38df-0310-8fa8-9805f1628bb7

tap-sctpchunkstat.c
tap-stats_tree.c

index eb2b5e6fb6e01bac1c6b283fbf3c81c0ce93e08c..5730395d0a63b14342f21d646aff69b8f1a60240 100644 (file)
@@ -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 {
index 350d4ace49d57e0a01a7a1b580521eef08ce63f0..04981d38b10a7d81fcc741310838b5b50acce5f8 100644 (file)
@@ -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);