From 35d1b406d74101f0ec04026e9a8b2ce75d57201d Mon Sep 17 00:00:00 2001 From: Bill Meier Date: Thu, 21 Mar 2013 02:58:59 +0000 Subject: From beroset: remove C++ incompatibilities https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10408 Note: The following parts of the patch had been previously done: asn1/snmp/packet-snmp-template.c epan/dissectors/packet-snmp.c epan/dissectors/packet-x11.c svn path=/trunk/; revision=48448 --- ui/gtk/ansi_a_stat.c | 10 +-- ui/gtk/ansi_map_stat.c | 10 +-- ui/gtk/bootp_stat.c | 16 ++--- ui/gtk/camel_counter.c | 6 +- ui/gtk/camel_srt.c | 6 +- ui/gtk/compare_stat.c | 42 ++++++------ ui/gtk/conversations_eth.c | 2 +- ui/gtk/conversations_fc.c | 2 +- ui/gtk/conversations_fddi.c | 2 +- ui/gtk/conversations_ip.c | 2 +- ui/gtk/conversations_ipv6.c | 2 +- ui/gtk/conversations_ipx.c | 2 +- ui/gtk/conversations_ncp.c | 2 +- ui/gtk/conversations_rsvp.c | 2 +- ui/gtk/conversations_sctp.c | 2 +- ui/gtk/conversations_tcpip.c | 2 +- ui/gtk/conversations_tr.c | 2 +- ui/gtk/conversations_udpip.c | 2 +- ui/gtk/conversations_wlan.c | 2 +- ui/gtk/dcerpc_stat.c | 24 +++---- ui/gtk/diameter_stat.c | 10 +-- ui/gtk/expert_comp_dlg.c | 16 ++--- ui/gtk/fc_stat.c | 6 +- ui/gtk/flow_graph.c | 14 ++-- ui/gtk/funnel_stat.c | 36 +++++----- ui/gtk/gsm_a_stat.c | 10 +-- ui/gtk/gsm_map_stat.c | 10 +-- ui/gtk/gsm_map_summary.c | 2 +- ui/gtk/gtp_stat.c | 6 +- ui/gtk/h225_counter.c | 6 +- ui/gtk/h225_ras_srt.c | 10 +-- ui/gtk/hostlist_eth.c | 2 +- ui/gtk/hostlist_fc.c | 2 +- ui/gtk/hostlist_fddi.c | 2 +- ui/gtk/hostlist_ip.c | 2 +- ui/gtk/hostlist_ipv6.c | 2 +- ui/gtk/hostlist_ipx.c | 2 +- ui/gtk/hostlist_jxta.c | 2 +- ui/gtk/hostlist_rsvp.c | 2 +- ui/gtk/hostlist_sctp.c | 2 +- ui/gtk/hostlist_tcpip.c | 2 +- ui/gtk/hostlist_tr.c | 2 +- ui/gtk/hostlist_udpip.c | 2 +- ui/gtk/hostlist_wlan.c | 2 +- ui/gtk/iax2_analysis.c | 56 ++++++++-------- ui/gtk/io_stat.c | 66 +++++++++--------- ui/gtk/ldap_stat.c | 6 +- ui/gtk/mac_lte_stat_dlg.c | 8 +-- ui/gtk/megaco_stat.c | 4 +- ui/gtk/mgcp_stat.c | 6 +- ui/gtk/mtp3_stat.c | 12 ++-- ui/gtk/mtp3_summary.c | 2 +- ui/gtk/ncp_stat.c | 6 +- ui/gtk/radius_stat.c | 6 +- ui/gtk/rlc_lte_graph.c | 2 +- ui/gtk/rlc_lte_stat_dlg.c | 8 +-- ui/gtk/rpc_progs.c | 10 +-- ui/gtk/rpc_stat.c | 22 +++--- ui/gtk/rtp_analysis.c | 32 ++++----- ui/gtk/rtp_stream_dlg.c | 8 +-- ui/gtk/sctp_assoc_analyse.c | 12 ++-- ui/gtk/sctp_chunk_stat.c | 6 +- ui/gtk/sctp_chunk_stat_dlg.c | 16 ++--- ui/gtk/sctp_stat_dlg.c | 2 +- ui/gtk/sip_stat.c | 20 +++--- ui/gtk/smb2_stat.c | 6 +- ui/gtk/smb_stat.c | 6 +- ui/gtk/stats_tree_stat.c | 18 ++--- ui/gtk/tcp_graph.c | 4 +- ui/gtk/voip_calls.c | 156 +++++++++++++++++++++---------------------- ui/gtk/voip_calls_dlg.c | 26 ++++---- ui/gtk/wlan_stat_dlg.c | 16 ++--- ui/gtk/wsp_stat.c | 20 +++--- 73 files changed, 426 insertions(+), 428 deletions(-) (limited to 'ui/gtk') diff --git a/ui/gtk/ansi_a_stat.c b/ui/gtk/ansi_a_stat.c index d75bbb763d..2f6927a443 100644 --- a/ui/gtk/ansi_a_stat.c +++ b/ui/gtk/ansi_a_stat.c @@ -83,7 +83,7 @@ static void ansi_a_stat_reset( void *tapdata) { - ansi_a_stat_t *stat_p = tapdata; + ansi_a_stat_t *stat_p = (ansi_a_stat_t *)tapdata; memset(stat_p, 0, sizeof(ansi_a_stat_t)); } @@ -96,8 +96,8 @@ ansi_a_stat_packet( epan_dissect_t *edt _U_, const void *data) { - ansi_a_stat_t *stat_p = tapdata; - const ansi_a_tap_rec_t *data_p = data; + ansi_a_stat_t *stat_p = (ansi_a_stat_t *)tapdata; + const ansi_a_tap_rec_t *data_p = (ansi_a_tap_rec_t *)data; switch (data_p->pdu_type) { @@ -124,7 +124,7 @@ static void ansi_a_stat_draw( void *tapdata) { - ansi_a_stat_t *stat_p = tapdata; + ansi_a_stat_t *stat_p = (ansi_a_stat_t *)tapdata; int i; GtkListStore *list_store; GtkTreeIter iter; @@ -304,7 +304,7 @@ ansi_a_stat_gtk_win_create( bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - bt_close = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + bt_close = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(dlg_p->win, bt_close, window_cancel_button_cb); g_signal_connect(dlg_p->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/ansi_map_stat.c b/ui/gtk/ansi_map_stat.c index c1f9d0cdb8..9cc7d57add 100644 --- a/ui/gtk/ansi_map_stat.c +++ b/ui/gtk/ansi_map_stat.c @@ -200,7 +200,7 @@ static void ansi_map_stat_reset( void *tapdata) { - ansi_map_stat_t *stat_p = tapdata; + ansi_map_stat_t *stat_p = (ansi_map_stat_t *)tapdata; memset(stat_p, 0, sizeof(ansi_map_stat_t)); } @@ -213,8 +213,8 @@ ansi_map_stat_packet( epan_dissect_t *edt _U_, const void *data) { - ansi_map_stat_t *stat_p = tapdata; - const ansi_map_tap_rec_t *data_p = data; + ansi_map_stat_t *stat_p = (ansi_map_stat_t *)tapdata; + const ansi_map_tap_rec_t *data_p = (const ansi_map_tap_rec_t *)data; #if 0 /* always false because message_type is 8 bit value */ if (data_p->message_type >= ANSI_MAP_MAX_NUM_MESSAGE_TYPES) @@ -237,7 +237,7 @@ static void ansi_map_stat_draw( void *tapdata) { - ansi_map_stat_t *stat_p = tapdata; + ansi_map_stat_t *stat_p = (ansi_map_stat_t *)tapdata; int i; float avg; GtkListStore *list_store; @@ -313,7 +313,7 @@ ansi_map_stat_gtk_win_create( bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - bt_close = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + bt_close = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(dlg_p->win, bt_close, window_cancel_button_cb); diff --git a/ui/gtk/bootp_stat.c b/ui/gtk/bootp_stat.c index ebed8feda3..5bc5dfa3a0 100644 --- a/ui/gtk/bootp_stat.c +++ b/ui/gtk/bootp_stat.c @@ -108,26 +108,26 @@ dhcp_draw_message_type(gchar *key _U_, dhcp_message_type_t *data, gchar *unused static void dhcpstat_reset(void *psp) { - dhcpstat_t *sp = psp; + dhcpstat_t *sp = (dhcpstat_t *)psp; g_hash_table_foreach(sp->hash, (GHFunc)dhcp_reset_hash, NULL); } static gboolean dhcpstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri) { - dhcpstat_t *sp = psp; - const bootp_info_value_t value = pri; + dhcpstat_t *sp = (dhcpstat_t *)psp; + const bootp_info_value_t value = (const bootp_info_value_t)pri; dhcp_message_type_t *sc; if (sp == NULL) return FALSE; - sc = g_hash_table_lookup( + sc = (dhcp_message_type_t *)g_hash_table_lookup( sp->hash, value); if (!sc) { /*g_warning("%s:%d What's Wrong for %s, doc ?", __FILE__, __LINE__, value);*/ - sc = g_malloc(sizeof(dhcp_message_type_t)); + sc = (dhcp_message_type_t *)g_malloc(sizeof(dhcp_message_type_t)); sc->packets = 1; sc->name = value; sc->widget = NULL; @@ -148,7 +148,7 @@ dhcpstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, cons static void dhcpstat_draw(void *psp) { - dhcpstat_t *sp = psp; + dhcpstat_t *sp = (dhcpstat_t *)psp; g_hash_table_foreach(sp->hash, (GHFunc)dhcp_draw_message_type, NULL); } @@ -186,7 +186,7 @@ dhcpstat_init(const char *opt_arg, void *userdata _U_) filter = NULL; } - sp = g_malloc(sizeof(dhcpstat_t)); + sp = (dhcpstat_t *)g_malloc(sizeof(dhcpstat_t)); sp->hash = g_hash_table_new_full(g_str_hash, g_str_equal, NULL, g_free); if(filter) { sp->filter = g_strdup(filter); @@ -238,7 +238,7 @@ dhcpstat_init(const char *opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - bt_close = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + bt_close = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(sp->win, bt_close, window_cancel_button_cb); g_signal_connect(sp->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/camel_counter.c b/ui/gtk/camel_counter.c index 185b9b7aad..21937454e7 100644 --- a/ui/gtk/camel_counter.c +++ b/ui/gtk/camel_counter.c @@ -92,7 +92,7 @@ static int gtk_camelcounter_packet(void *phs, const void *phi) { struct camelcounter_t * p_counter =(struct camelcounter_t *)phs; - const struct camelsrt_info_t * pi=phi; + const struct camelsrt_info_t * pi=(struct camelsrt_info_t *)phi; if (pi->opcode != 255) p_counter->camel_msg[pi->opcode]++; @@ -158,7 +158,7 @@ static void gtk_camelcounter_init(const char *opt_arg, void *userdata _U_) filter=NULL; } - p_camelcounter=g_malloc(sizeof(struct camelcounter_t)); + p_camelcounter=(struct camelcounter_t *)g_malloc(sizeof(struct camelcounter_t)); p_camelcounter->filter=g_strdup(filter); gtk_camelcounter_reset(p_camelcounter); @@ -195,7 +195,7 @@ static void gtk_camelcounter_init(const char *opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_end(GTK_BOX(p_camelcounter->vbox), bbox, FALSE, FALSE, 0); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(p_camelcounter->win, close_bt, window_cancel_button_cb); g_signal_connect(p_camelcounter->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/camel_srt.c b/ui/gtk/camel_srt.c index 639dbb0847..5e2709654e 100644 --- a/ui/gtk/camel_srt.c +++ b/ui/gtk/camel_srt.c @@ -95,7 +95,7 @@ static int camelsrt_packet(void *phs, const void *phi) { struct camelsrt_t *hs=(struct camelsrt_t *)phs; - const struct camelsrt_info_t * pi=phi; + const struct camelsrt_info_t * pi=(struct camelsrt_info_t *)phi; int i; for (i=1; iwin= dlg_window_new("camel-srt"); /* transient_for top_level */ gtk_window_set_destroy_with_parent (GTK_WINDOW(p_camelsrt->win), TRUE); @@ -207,7 +207,7 @@ static void gtk_camelsrt_init(const char *opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(p_camelsrt->win, close_bt, window_cancel_button_cb); g_signal_connect(p_camelsrt->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/compare_stat.c b/ui/gtk/compare_stat.c index 62d36c34e7..e07ee96eaa 100644 --- a/ui/gtk/compare_stat.c +++ b/ui/gtk/compare_stat.c @@ -166,7 +166,7 @@ comparestat_set_title(compstat_t *cs) static void comparestat_reset(void *arg) { - compstat_t *cs=arg; + compstat_t *cs=(compstat_t *)arg; SET_ADDRESS(&cs->eth_src, AT_ETHER, 0, NULL); SET_ADDRESS(&cs->eth_dst, AT_ETHER, 0, NULL); @@ -184,8 +184,8 @@ comparestat_reset(void *arg) static int comparestat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *arg2) { - compstat_t *cs=arg; - const ws_ip *ci=arg2; + compstat_t *cs=(compstat_t *)arg; + const ws_ip *ci=(ws_ip *)arg2; frame_info *fInfo, *fInfoTemp; vec_t cksum_vec[3]; guint16 computed_cksum=0; @@ -203,14 +203,14 @@ comparestat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const cksum_vec[1].ptr=&ci->ip_p; cksum_vec[1].len=1; /* skip header checksum and ip's (because of NAT)*/ - cksum_vec[2].ptr=ci->ip_dst.data; + cksum_vec[2].ptr=(guint8 *)ci->ip_dst.data; cksum_vec[2].ptr=cksum_vec[2].ptr+ci->ip_dst.len; /* dynamic computation */ cksum_vec[2].len=pinfo->iphdrlen-20; computed_cksum=in_cksum(&cksum_vec[0], 3); /* Set up the new order to create the zebra effect */ - fInfoTemp=se_tree_lookup32(cs->packet_tree, pinfo->fd->num); + fInfoTemp=(frame_info *)se_tree_lookup32(cs->packet_tree, pinfo->fd->num); if((fInfoTemp!=NULL)){ col_set_time(pinfo->cinfo, COL_INFO, &fInfoTemp->zebra_time, "ZebraTime"); } @@ -253,7 +253,7 @@ call_foreach_count_ip_id(gpointer value, gpointer arg) pinfo->fd=(frame_data*)ep_alloc(sizeof(frame_data)); pinfo->fd->num = fInfo->num; - fInfoTemp=se_tree_lookup32(cs->ip_id_tree, fInfo->id); + fInfoTemp=(frame_info *)se_tree_lookup32(cs->ip_id_tree, fInfo->id); if(fInfoTemp==NULL){ /* Detect ongoing package loss */ if((cs->last_hit==FALSE)&&(cs->start_ongoing_hits>compare_start)&&(cs->stop_ongoing_hitsnr_tree, fInfo->id); + fInfoTemp=(frame_info *)se_tree_lookup32(cs->nr_tree, fInfo->id); if(fInfoTemp==NULL){ if(TTL_method==FALSE){ if((ADDRESSES_EQUAL(&cs->eth_dst, &fInfo->dl_dst)) || (ADDRESSES_EQUAL(&cs->eth_src, &fInfo->dl_dst))){ @@ -400,7 +400,7 @@ call_foreach_merge_settings(gpointer value, gpointer arg) } if((fInfo->num==tot_packet_amount)&&(cs->stop_packet_nr_first==G_MAXINT32)&&(cs->start_packet_nr_first!=G_MAXINT32)){ - fInfoTemp=se_tree_lookup32(cs->packet_tree, cs->start_packet_nr_first); + fInfoTemp=(frame_info *)se_tree_lookup32(cs->packet_tree, cs->start_packet_nr_first); if(fInfoTemp==NULL){ fprintf(stderr,"ERROR: Incorrect start number\n"); } @@ -414,10 +414,10 @@ call_foreach_merge_settings(gpointer value, gpointer arg) if(cs->stop_packet_nr_first>cs->start_packet_nr_second){ cs->stop_packet_nr_first=cs->start_packet_nr_second-1; } - fInfoTemp=se_tree_lookup32(cs->packet_tree, cs->stop_packet_nr_first); + fInfoTemp=(frame_info *)se_tree_lookup32(cs->packet_tree, cs->stop_packet_nr_first); while((fInfoTemp!=NULL)?fmod(!fInfoTemp->zebra_time.nsecs, 2):TRUE){ cs->stop_packet_nr_first--; - fInfoTemp=se_tree_lookup32(cs->packet_tree, cs->stop_packet_nr_first); + fInfoTemp=(frame_info *)se_tree_lookup32(cs->packet_tree, cs->stop_packet_nr_first); } } else { /*this only happens if we have too many MAC's or TTL*/ @@ -425,10 +425,10 @@ call_foreach_merge_settings(gpointer value, gpointer arg) if(cs->stop_packet_nr_first>tot_packet_amount-cs->first_file_amount){ cs->stop_packet_nr_first=tot_packet_amount-cs->first_file_amount; } - fInfoTemp=se_tree_lookup32(cs->packet_tree, cs->stop_packet_nr_first); + fInfoTemp=(frame_info *)se_tree_lookup32(cs->packet_tree, cs->stop_packet_nr_first); while((fInfoTemp!=NULL)?fmod(fInfoTemp->zebra_time.nsecs, 2):TRUE){ cs->stop_packet_nr_first--; - fInfoTemp=se_tree_lookup32(cs->packet_tree, cs->stop_packet_nr_first); + fInfoTemp=(frame_info *)se_tree_lookup32(cs->packet_tree, cs->stop_packet_nr_first); } } /* set second stop location */ @@ -536,7 +536,7 @@ win_destroy_cb(GtkWindow *win _U_, gpointer data) static void comparestat_draw(void *arg) { - compstat_t *cs = arg; + compstat_t *cs = (compstat_t *)arg; GString *filter_str = g_string_new(""); const gchar *statis_string; frame_info *fInfo; @@ -606,14 +606,14 @@ comparestat_draw(void *arg) /* add start and stop of scanning */ if(cs->start_packet_nr_first!=G_MAXINT32&&compare_start!=0&&compare_stop!=0){ - fInfo=se_tree_lookup32(cs->packet_tree, cs->start_packet_nr_first); + fInfo=(frame_info *)se_tree_lookup32(cs->packet_tree, cs->start_packet_nr_first); if(fInfo){ gtk_tree_store_append(GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(cs->treeview))), &cs->iter, NULL); gtk_tree_store_set(GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(cs->treeview))), &cs->iter, IP_ID, fInfo->id, PROBLEM, "Start scanning", COUNT, 0, DELTA, 0.0, -1); } } if(cs->stop_packet_nr_first!=G_MAXINT32&&compare_start!=0&&compare_stop!=0){ - fInfo=se_tree_lookup32(cs->packet_tree, cs->stop_packet_nr_first); + fInfo=(frame_info *)se_tree_lookup32(cs->packet_tree, cs->stop_packet_nr_first); if(fInfo){ gtk_tree_store_append(GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(cs->treeview))), &cs->iter, NULL); gtk_tree_store_set(GTK_TREE_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW(cs->treeview))), &cs->iter, IP_ID, fInfo->id, PROBLEM, "Stop scanning", COUNT, 0, DELTA, 0.0, -1); @@ -651,7 +651,7 @@ new_tree_view_selection_changed(GtkTreeSelection *sel, gpointer user_data) cf_goto_frame(&cfile, cs->stop_packet_nr_first); return; } - fInfo=se_tree_lookup32(cs->ip_id_tree, id); + fInfo=(frame_info *)se_tree_lookup32(cs->ip_id_tree, id); if(fInfo != NULL){ cf_goto_frame(&cfile, fInfo->num); } @@ -722,7 +722,7 @@ gtk_comparestat_init(const char *opt_arg, void* userdata _U_) TTL_method=ttl; ON_method=order; - cs=g_malloc(sizeof(compstat_t)); + cs=(compstat_t *)g_malloc(sizeof(compstat_t)); nstime_set_unset(&cs->current_time); cs->ip_ttl_list=g_array_new(FALSE, FALSE, sizeof(guint8)); cs->last_hit=FALSE; @@ -809,10 +809,10 @@ gtk_comparestat_init(const char *opt_arg, void* userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, GTK_STOCK_HELP, NULL); gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(cs->win, close_bt, window_cancel_button_cb); - help_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP); + help_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP); g_signal_connect(help_bt, "clicked", G_CALLBACK(topic_cb), (gpointer)HELP_STATS_COMPARE_FILES_DIALOG); g_signal_connect(cs->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); @@ -1035,10 +1035,10 @@ gtk_comparestat_cb(GtkAction *action _U_, gpointer user_data _U_) gtk_box_pack_start(GTK_BOX(dlg_box), bbox, FALSE, FALSE, 0); gtk_widget_show(bbox); - start_button = g_object_get_data(G_OBJECT(bbox), WIRESHARK_STOCK_CREATE_STAT); + start_button = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), WIRESHARK_STOCK_CREATE_STAT); g_signal_connect_swapped(start_button, "clicked", G_CALLBACK(comparestat_start_button_clicked), NULL); - cancel_button = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CANCEL); + cancel_button = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CANCEL); window_set_cancel_button(dlg, cancel_button, window_cancel_button_cb); /* give the initial focus to the "filter" entry box. */ diff --git a/ui/gtk/conversations_eth.c b/ui/gtk/conversations_eth.c index 41b79d4747..ed3ffe9dbf 100644 --- a/ui/gtk/conversations_eth.c +++ b/ui/gtk/conversations_eth.c @@ -41,7 +41,7 @@ static int eth_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { - const eth_hdr *ehdr=vip; + const eth_hdr *ehdr=(eth_hdr *)vip; add_conversation_table_data((conversations_table *)pct, &ehdr->src, &ehdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_ETHER, PT_NONE); diff --git a/ui/gtk/conversations_fc.c b/ui/gtk/conversations_fc.c index 34dbb7c312..ee1f8c7de8 100644 --- a/ui/gtk/conversations_fc.c +++ b/ui/gtk/conversations_fc.c @@ -44,7 +44,7 @@ static int fc_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { - const fc_hdr *fchdr=vip; + const fc_hdr *fchdr=(fc_hdr *)vip; add_conversation_table_data((conversations_table *)pct, &fchdr->s_id, &fchdr->d_id, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_NONE, PT_NONE); diff --git a/ui/gtk/conversations_fddi.c b/ui/gtk/conversations_fddi.c index e18aaf6f4f..dce562f944 100644 --- a/ui/gtk/conversations_fddi.c +++ b/ui/gtk/conversations_fddi.c @@ -41,7 +41,7 @@ static int fddi_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { - const fddi_hdr *ehdr=vip; + const fddi_hdr *ehdr=(fddi_hdr *)vip; add_conversation_table_data((conversations_table *)pct, &ehdr->src, &ehdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_FDDI, PT_NONE); diff --git a/ui/gtk/conversations_ip.c b/ui/gtk/conversations_ip.c index 3cf503b0f8..8fbf67602a 100644 --- a/ui/gtk/conversations_ip.c +++ b/ui/gtk/conversations_ip.c @@ -41,7 +41,7 @@ static int ip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { - const ws_ip *iph=vip; + const ws_ip *iph=(ws_ip *)vip; add_conversation_table_data((conversations_table *)pct, &iph->ip_src, &iph->ip_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_NONE, PT_NONE); diff --git a/ui/gtk/conversations_ipv6.c b/ui/gtk/conversations_ipv6.c index 3bc2ee8307..6d03cd55e5 100644 --- a/ui/gtk/conversations_ipv6.c +++ b/ui/gtk/conversations_ipv6.c @@ -41,7 +41,7 @@ static int ipv6_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { - const struct ip6_hdr *ip6h = vip; + const struct ip6_hdr *ip6h = (struct ip6_hdr *)vip; address src; address dst; diff --git a/ui/gtk/conversations_ipx.c b/ui/gtk/conversations_ipx.c index f0751feffc..9664f88c48 100644 --- a/ui/gtk/conversations_ipx.c +++ b/ui/gtk/conversations_ipx.c @@ -42,7 +42,7 @@ static int ipx_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { - const ipxhdr_t *ipxh=vip; + const ipxhdr_t *ipxh=(ipxhdr_t *)vip; add_conversation_table_data((conversations_table *)pct, &ipxh->ipx_src, &ipxh->ipx_dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_NONE, PT_NONE); diff --git a/ui/gtk/conversations_ncp.c b/ui/gtk/conversations_ncp.c index 0bd48dc9c3..e1e9e415f7 100644 --- a/ui/gtk/conversations_ncp.c +++ b/ui/gtk/conversations_ncp.c @@ -41,7 +41,7 @@ static int ncp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { - const struct ncp_common_header *ncph=vip; + const struct ncp_common_header *ncph=(struct ncp_common_header *)vip; guint32 connection; connection = (ncph->conn_high * 256)+ncph->conn_low; diff --git a/ui/gtk/conversations_rsvp.c b/ui/gtk/conversations_rsvp.c index 848d98052a..33bb3d1819 100644 --- a/ui/gtk/conversations_rsvp.c +++ b/ui/gtk/conversations_rsvp.c @@ -41,7 +41,7 @@ static int rsvp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { - const rsvp_conversation_info *rsvph = vip; + const rsvp_conversation_info *rsvph = (rsvp_conversation_info *)vip; add_conversation_table_data((conversations_table *)pct, &rsvph->source, &rsvph->destination, 0, 0, 1, diff --git a/ui/gtk/conversations_sctp.c b/ui/gtk/conversations_sctp.c index 3c5a3b067f..e02783b940 100644 --- a/ui/gtk/conversations_sctp.c +++ b/ui/gtk/conversations_sctp.c @@ -41,7 +41,7 @@ static int sctp_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { - const struct _sctp_info *sctphdr=vip; + const struct _sctp_info *sctphdr=(struct _sctp_info *)vip; add_conversation_table_data((conversations_table *)pct, &sctphdr->ip_src, diff --git a/ui/gtk/conversations_tcpip.c b/ui/gtk/conversations_tcpip.c index 6504d905de..e999375d47 100644 --- a/ui/gtk/conversations_tcpip.c +++ b/ui/gtk/conversations_tcpip.c @@ -41,7 +41,7 @@ static int tcpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { - const struct tcpheader *tcphdr=vip; + const struct tcpheader *tcphdr=(struct tcpheader *)vip; add_conversation_table_data_with_conv_id((conversations_table *)pct, &tcphdr->ip_src, &tcphdr->ip_dst, tcphdr->th_sport, tcphdr->th_dport, (conv_id_t) tcphdr->th_stream, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_NONE, PT_TCP); diff --git a/ui/gtk/conversations_tr.c b/ui/gtk/conversations_tr.c index 28bc003ac2..87cfc80c45 100644 --- a/ui/gtk/conversations_tr.c +++ b/ui/gtk/conversations_tr.c @@ -41,7 +41,7 @@ static int tr_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { - const tr_hdr *trhdr=vip; + const tr_hdr *trhdr=(tr_hdr *)vip; add_conversation_table_data((conversations_table *)pct, &trhdr->src, &trhdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_TOKENRING, PT_NONE); diff --git a/ui/gtk/conversations_udpip.c b/ui/gtk/conversations_udpip.c index b9f03d21e8..180d32e28f 100644 --- a/ui/gtk/conversations_udpip.c +++ b/ui/gtk/conversations_udpip.c @@ -41,7 +41,7 @@ static int udpip_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { - const e_udphdr *udphdr=vip; + const e_udphdr *udphdr=(e_udphdr *)vip; add_conversation_table_data((conversations_table *)pct, &udphdr->ip_src, &udphdr->ip_dst, udphdr->uh_sport, udphdr->uh_dport, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_NONE, PT_UDP); diff --git a/ui/gtk/conversations_wlan.c b/ui/gtk/conversations_wlan.c index f89a952bcf..c2de6ae32f 100644 --- a/ui/gtk/conversations_wlan.c +++ b/ui/gtk/conversations_wlan.c @@ -41,7 +41,7 @@ static int wlan_conversation_packet(void *pct, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { - const wlan_hdr *whdr=vip; + const wlan_hdr *whdr=(wlan_hdr *)vip; add_conversation_table_data((conversations_table *)pct, &whdr->src, &whdr->dst, 0, 0, 1, pinfo->fd->pkt_len, &pinfo->fd->rel_ts, SAT_WLAN, PT_NONE); diff --git a/ui/gtk/dcerpc_stat.c b/ui/gtk/dcerpc_stat.c index 6813bec890..c44d793674 100644 --- a/ui/gtk/dcerpc_stat.c +++ b/ui/gtk/dcerpc_stat.c @@ -113,7 +113,7 @@ dcerpcstat_set_title(dcerpcstat_t *rs) static void dcerpcstat_reset(void *rs_arg) { - dcerpcstat_t *rs = rs_arg; + dcerpcstat_t *rs = (dcerpcstat_t *)rs_arg; reset_srt_table_data(&rs->srt_table); dcerpcstat_set_title(rs); @@ -123,8 +123,8 @@ dcerpcstat_reset(void *rs_arg) static gboolean dcerpcstat_packet(void *rs_arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *ri_arg) { - dcerpcstat_t *rs = rs_arg; - const dcerpc_info *ri = ri_arg; + dcerpcstat_t *rs = (dcerpcstat_t *)rs_arg; + const dcerpc_info *ri = (dcerpc_info *)ri_arg; if(!ri->call_data){ return FALSE; @@ -159,7 +159,7 @@ dcerpcstat_packet(void *rs_arg, packet_info *pinfo, epan_dissect_t *edt _U_, con static void dcerpcstat_draw(void *rs_arg) { - dcerpcstat_t *rs = rs_arg; + dcerpcstat_t *rs = (dcerpcstat_t *)rs_arg; draw_srt_table_data(&rs->srt_table); } @@ -246,7 +246,7 @@ gtk_dcerpcstat_init(const char *opt_arg, void* userdata _U_) } ver = major; - rs = g_malloc(sizeof(dcerpcstat_t)); + rs = (dcerpcstat_t *)g_malloc(sizeof(dcerpcstat_t)); rs->prog = dcerpc_get_proto_name(&uuid, ver); if(!rs->prog){ g_free(rs); @@ -326,7 +326,7 @@ gtk_dcerpcstat_init(const char *opt_arg, void* userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(rs->win, close_bt, window_cancel_button_cb); g_signal_connect(rs->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); @@ -385,7 +385,7 @@ dcerpcstat_version_select(GtkWidget *vers_combo_box, gpointer user_data _U_) { dcerpc_uuid_key *k; - if (! ws_combo_box_get_active_pointer(GTK_COMBO_BOX(vers_combo_box), (gpointer)&k)) { + if (! ws_combo_box_get_active_pointer(GTK_COMBO_BOX(vers_combo_box), (gpointer *)&k)) { g_assert_not_reached(); /* Programming error: somehow no active item */ } @@ -396,7 +396,7 @@ static void dcerpcstat_find_vers(gpointer *key, gpointer *value _U_, gpointer user_data) { dcerpc_uuid_key *k = (dcerpc_uuid_key *)key; - GtkWidget *vers_combo_box = user_data; + GtkWidget *vers_combo_box = (GtkWidget *)user_data; char vs[5]; if(!uuid_equal(&(k->uuid), dcerpc_uuid_program)){ @@ -412,9 +412,9 @@ dcerpcstat_program_select(GtkWidget *prog_combo_box, gpointer user_data) dcerpc_uuid_key *k; GtkWidget *vers_combo_box; - vers_combo_box = user_data; + vers_combo_box = (GtkWidget *)user_data; - if (! ws_combo_box_get_active_pointer(GTK_COMBO_BOX(prog_combo_box), (gpointer)&k)) { + if (! ws_combo_box_get_active_pointer(GTK_COMBO_BOX(prog_combo_box), (gpointer *)&k)) { g_assert_not_reached(); /* Programming error: somehow no active item */ } @@ -687,11 +687,11 @@ void gtk_dcerpcstat_cb(GtkAction *action _U_, gpointer user_data _U_) gtk_box_pack_start(GTK_BOX(dlg_box), bbox, FALSE, FALSE, 0); gtk_widget_show(bbox); - start_button = g_object_get_data(G_OBJECT(bbox), WIRESHARK_STOCK_CREATE_STAT); + start_button = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), WIRESHARK_STOCK_CREATE_STAT); g_signal_connect_swapped(start_button, "clicked", G_CALLBACK(dcerpcstat_start_button_clicked), NULL); - cancel_button = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CANCEL); + cancel_button = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CANCEL); window_set_cancel_button(dlg, cancel_button, window_cancel_button_cb); g_signal_connect(dlg, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/diameter_stat.c b/ui/gtk/diameter_stat.c index 3ba9df845f..d2d260bac9 100644 --- a/ui/gtk/diameter_stat.c +++ b/ui/gtk/diameter_stat.c @@ -78,7 +78,7 @@ diameterstat_reset(void *pdiameter) static int diameterstat_packet(void *pdiameter, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pdi) { - const diameter_req_ans_pair_t *diameter=pdi; + const diameter_req_ans_pair_t *diameter=(diameter_req_ans_pair_t *)pdi; diameterstat_t *fs=(diameterstat_t *)pdiameter; int* idx = NULL; @@ -90,7 +90,7 @@ diameterstat_packet(void *pdiameter, packet_info *pinfo, epan_dissect_t *edt _U_ idx = (int*) g_hash_table_lookup(cmd_str_hash, diameter->cmd_str); if (idx == NULL) { - idx = g_malloc(sizeof(int)); + idx = (int *)g_malloc(sizeof(int)); *idx = (int) g_hash_table_size(cmd_str_hash); g_hash_table_insert(cmd_str_hash, (gchar*) diameter->cmd_str, idx); init_srt_table_row(&fs->diameter_srt_table, *idx, (const char*) diameter->cmd_str); @@ -144,8 +144,8 @@ gtk_diameterstat_init(const char *opt_arg, void *userdata _U_) filter="diameter"; /*NULL doesn't work here like in LDAP. Too little time/lazy to find out why ?*/ } - diameter=g_malloc(sizeof(diameterstat_t)); - idx = g_malloc(sizeof(int)); + diameter=(diameterstat_t *)g_malloc(sizeof(diameterstat_t)); + idx = (int *)g_malloc(sizeof(int)); *idx = 0; cmd_str_hash = g_hash_table_new(g_str_hash,g_str_equal); g_hash_table_insert(cmd_str_hash, (gchar *)"Unknown", idx); @@ -194,7 +194,7 @@ gtk_diameterstat_init(const char *opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(diameter->win, close_bt, window_cancel_button_cb); g_signal_connect(diameter->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/expert_comp_dlg.c b/ui/gtk/expert_comp_dlg.c index 3bd28db3b8..517f10f3f5 100644 --- a/ui/gtk/expert_comp_dlg.c +++ b/ui/gtk/expert_comp_dlg.c @@ -155,7 +155,7 @@ static void expert_dlg_display_reset(expert_tapdata_t * etd) static void expert_dlg_reset(void *tapdata) { - expert_tapdata_t * etd = tapdata; + expert_tapdata_t * etd = (expert_tapdata_t *)tapdata; etd->chat_events = 0; etd->note_events = 0; @@ -176,7 +176,7 @@ static int expert_dlg_packet(void *tapdata, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pointer) { expert_info_t *ei; - expert_tapdata_t *etd = tapdata; + expert_tapdata_t *etd = (expert_tapdata_t *)tapdata; g_array_append_val(etd->ei_array, *(expert_info_t *)pointer); etd->last = etd->ei_array->len; @@ -259,7 +259,7 @@ static gboolean error_packet(void *pss, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *prv) { expert_comp_dlg_t *ss=(expert_comp_dlg_t *)pss; - const expert_info_t *error_pkt=prv; + const expert_info_t *error_pkt=(expert_info_t *)prv; /* if return value is 0 then no error */ if(error_pkt==NULL){ @@ -366,7 +366,7 @@ expert_dlg_destroy_cb(GtkWindow *win _U_, gpointer data) static expert_tapdata_t * expert_dlg_new_table(void) { expert_tapdata_t * etd; - etd=g_malloc0(sizeof(expert_tapdata_t)); + etd=(expert_tapdata_t *)g_malloc0(sizeof(expert_tapdata_t)); etd->ei_array = g_array_sized_new(FALSE, FALSE, sizeof(expert_info_t), 1000); etd->text = g_string_chunk_new(100); @@ -643,7 +643,7 @@ expert_dlg_init_table(expert_tapdata_t * etd, GtkWidget *vbox) static void expert_dlg_draw(void *data) { - expert_tapdata_t *etd = data; + expert_tapdata_t *etd = (expert_tapdata_t *)data; expert_info_t *ei; gchar *title; const char *entries[2]; /**< column entries */ @@ -773,7 +773,7 @@ expert_comp_init(const char *opt_arg _U_, void* userdata _U_) GtkWidget *help_bt; expert_tapdata_t *etd; - ss=g_malloc(sizeof(expert_comp_dlg_t)); + ss=(expert_comp_dlg_t *)g_malloc(sizeof(expert_comp_dlg_t)); ss->pkt_comments_events = 0; ss->disp_events = 0; @@ -919,10 +919,10 @@ expert_comp_init(const char *opt_arg _U_, void* userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, GTK_STOCK_HELP, NULL); gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(ss->win, close_bt, window_cancel_button_cb); - help_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP); + help_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP); g_signal_connect(help_bt, "clicked", G_CALLBACK(topic_cb), (gpointer)HELP_EXPERT_INFO_DIALOG); gtk_widget_set_tooltip_text (help_bt, "Show topic specific help"); diff --git a/ui/gtk/fc_stat.c b/ui/gtk/fc_stat.c index fa4f8bad5e..4915df9178 100644 --- a/ui/gtk/fc_stat.c +++ b/ui/gtk/fc_stat.c @@ -74,7 +74,7 @@ fcstat_reset(void *pfc) static int fcstat_packet(void *pfc, packet_info *pinfo, epan_dissect_t *edt _U_, const void *psi) { - const fc_hdr *fc=psi; + const fc_hdr *fc=(fc_hdr *)psi; fcstat_t *fs=(fcstat_t *)pfc; /* we are only interested in reply packets */ @@ -133,7 +133,7 @@ gtk_fcstat_init(const char *opt_arg, void *userdata _U_) filter=NULL; } - fc=g_malloc(sizeof(fcstat_t)); + fc=(fcstat_t *)g_malloc(sizeof(fcstat_t)); fc->win = dlg_window_new("fc-stat"); /* transient_for top_level */ gtk_window_set_destroy_with_parent (GTK_WINDOW(fc->win), TRUE); @@ -178,7 +178,7 @@ gtk_fcstat_init(const char *opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(fc->win, close_bt, window_cancel_button_cb); g_signal_connect(fc->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/flow_graph.c b/ui/gtk/flow_graph.c index b3fb5ae7cd..1b043ac142 100644 --- a/ui/gtk/flow_graph.c +++ b/ui/gtk/flow_graph.c @@ -97,7 +97,7 @@ flow_graph_reset(void *ptr _U_) list = g_list_first(graph_analysis->list); while (list) { - graph_item = list->data; + graph_item = (graph_analysis_item_t *)list->data; g_free(graph_item->frame_label); g_free(graph_item->comment); g_free(list->data); @@ -112,7 +112,7 @@ flow_graph_reset(void *ptr _U_) /****************************************************************************/ static void flow_graph_data_init(void) { - graph_analysis = g_malloc(sizeof(graph_analysis_info_t)); + graph_analysis = (graph_analysis_info_t *)g_malloc(sizeof(graph_analysis_info_t)); graph_analysis->nconv = 0; graph_analysis->list = NULL; } @@ -230,7 +230,7 @@ flow_graph_frame_add_to_graph(packet_info *pinfo) if (node_addr_type == NODE_ADDR_TYPE_NET_SRCDST) { if (pinfo->net_src.type!=AT_NONE && pinfo->net_dst.type!=AT_NONE) { - gai = g_malloc(sizeof(graph_analysis_item_t)); + gai = (graph_analysis_item_t *)g_malloc(sizeof(graph_analysis_item_t)); COPY_ADDRESS(&(gai->src_addr),&(pinfo->net_src)); COPY_ADDRESS(&(gai->dst_addr),&(pinfo->net_dst)); } @@ -238,7 +238,7 @@ flow_graph_frame_add_to_graph(packet_info *pinfo) } else { if (pinfo->src.type!=AT_NONE && pinfo->dst.type!=AT_NONE) { - gai = g_malloc(sizeof(graph_analysis_item_t)); + gai = (graph_analysis_item_t *)g_malloc(sizeof(graph_analysis_item_t)); COPY_ADDRESS(&(gai->src_addr),&(pinfo->src)); COPY_ADDRESS(&(gai->dst_addr),&(pinfo->dst)); } @@ -319,7 +319,7 @@ flow_graph_tcp_add_to_graph(packet_info *pinfo, const struct tcpheader *tcph) gboolean flags_found = FALSE; gchar flags[64]; - gai = g_malloc(sizeof(graph_analysis_item_t)); + gai = (graph_analysis_item_t *)g_malloc(sizeof(graph_analysis_item_t)); gai->fd = pinfo->fd; if (node_addr_type == NODE_ADDR_TYPE_NET_SRCDST) { COPY_ADDRESS(&(gai->src_addr),&(pinfo->net_src)); @@ -386,7 +386,7 @@ flow_graph_frame_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt static gboolean flow_graph_tcp_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void *tcp_info) { - const struct tcpheader *tcph = tcp_info; + const struct tcpheader *tcph = (struct tcpheader *)tcp_info; if ((type_of_packets == TYPE_OF_PACKETS_ALL)||(pinfo->fd->flags.passed_dfilter==1)){ flow_graph_tcp_add_to_graph(pinfo,tcph); @@ -455,7 +455,7 @@ flow_graph_on_ok(GtkButton *button _U_, graph_analysis_update(graph_analysis_data); /* refresh it xxx */ } else{ - graph_analysis_data->dlg.parent_w = user_data; + graph_analysis_data->dlg.parent_w = (GtkWidget *)user_data; graph_analysis_create(graph_analysis_data); } } diff --git a/ui/gtk/funnel_stat.c b/ui/gtk/funnel_stat.c index 9bdd0d94f2..64c07f9b03 100644 --- a/ui/gtk/funnel_stat.c +++ b/ui/gtk/funnel_stat.c @@ -85,7 +85,7 @@ struct _funnel_node_t { }; static void text_window_cancel_button_cb(GtkWidget *bt _U_, gpointer data) { - funnel_text_window_t* tw = data; + funnel_text_window_t* tw = (funnel_text_window_t *)data; window_destroy(GTK_WIDGET(tw->win)); tw->win = NULL; @@ -95,7 +95,7 @@ static void text_window_cancel_button_cb(GtkWidget *bt _U_, gpointer data) { } static void unref_text_win_cancel_bt_cb(GtkWidget *bt _U_, gpointer data) { - funnel_text_window_t* tw = data; + funnel_text_window_t* tw = (funnel_text_window_t *)data; guint i; window_destroy(GTK_WIDGET(tw->win)); @@ -105,7 +105,7 @@ static void unref_text_win_cancel_bt_cb(GtkWidget *bt _U_, gpointer data) { tw->close_cb(tw->close_data); for (i = 0; i < tw->buttons->len; i++) { - funnel_bt_t* cbd = g_ptr_array_index(tw->buttons,i); + funnel_bt_t* cbd = (funnel_bt_t *)g_ptr_array_index(tw->buttons,i); /* XXX a free cb should be passed somehow */ if (cbd->data && cbd->free_data_fcn) cbd->free_data_fcn(cbd->data); if (cbd->free_fcn) cbd->free_fcn(cbd); @@ -116,7 +116,7 @@ static void unref_text_win_cancel_bt_cb(GtkWidget *bt _U_, gpointer data) { static gboolean text_window_unref_del_event_cb(GtkWidget *win _U_, GdkEvent *event _U_, gpointer user_data) { - funnel_text_window_t* tw = user_data; + funnel_text_window_t* tw = (funnel_text_window_t *)user_data; guint i; window_destroy(GTK_WIDGET(tw->win)); @@ -126,7 +126,7 @@ static gboolean text_window_unref_del_event_cb(GtkWidget *win _U_, GdkEvent *eve tw->close_cb(tw->close_data); for (i = 0; i < tw->buttons->len; i++) { - funnel_bt_t* cbd = g_ptr_array_index(tw->buttons,i); + funnel_bt_t* cbd = (funnel_bt_t *)g_ptr_array_index(tw->buttons,i); /* XXX a free cb should be passed somehow */ if (cbd->data && cbd->free_data_fcn) cbd->free_data_fcn(cbd->data); if (cbd->free_fcn) cbd->free_fcn(cbd); @@ -139,7 +139,7 @@ static gboolean text_window_unref_del_event_cb(GtkWidget *win _U_, GdkEvent *eve static gboolean text_window_delete_event_cb(GtkWidget *win _U_, GdkEvent *event _U_, gpointer user_data) { - funnel_text_window_t* tw = user_data; + funnel_text_window_t* tw = (funnel_text_window_t *)user_data; window_destroy(GTK_WIDGET(tw->win)); tw->win = NULL; @@ -151,7 +151,7 @@ static gboolean text_window_delete_event_cb(GtkWidget *win _U_, GdkEvent *event } static funnel_text_window_t* new_text_window(const gchar* title) { - funnel_text_window_t* tw = g_malloc(sizeof(funnel_text_window_t)); + funnel_text_window_t* tw = (funnel_text_window_t *)g_malloc(sizeof(funnel_text_window_t)); GtkWidget *txt_scrollw, *main_vb, *hbox; tw->close_cb = NULL; @@ -326,7 +326,7 @@ static void text_window_destroy(funnel_text_window_t* tw) { * the window already just free the container */ for (i = 0; i < tw->buttons->len; i++) { - funnel_bt_t* cbd = g_ptr_array_index(tw->buttons,i); + funnel_bt_t* cbd = (funnel_bt_t *)g_ptr_array_index(tw->buttons,i); /* XXX a free cb should be passed somehow */ if (cbd->data && cbd->free_data_fcn) cbd->free_data_fcn(cbd->data); if (cbd->free_fcn) cbd->free_fcn(cbd); @@ -343,7 +343,7 @@ static void text_window_set_editable(funnel_text_window_t* tw, gboolean editabl static gboolean text_window_button_cb(GtkWidget *bt _U_, gpointer user_data) { - funnel_bt_t* cbd = user_data; + funnel_bt_t* cbd = (funnel_bt_t *)user_data; if (cbd->func) { return cbd->func(cbd->tw,cbd->data); @@ -378,13 +378,13 @@ struct _funnel_dlg_data { static gboolean funnel_dlg_cb(GtkWidget *win _U_, gpointer user_data) { - struct _funnel_dlg_data* dd = user_data; + struct _funnel_dlg_data* dd = (struct _funnel_dlg_data *)user_data; guint i; guint len = dd->entries->len; GPtrArray* returns = g_ptr_array_new(); for(i=0; ientries,i); + GtkEntry* entry = (GtkEntry *)g_ptr_array_index(dd->entries,i); g_ptr_array_add(returns,g_strdup(gtk_entry_get_text(entry))); } @@ -401,7 +401,7 @@ static gboolean funnel_dlg_cb(GtkWidget *win _U_, gpointer user_data) } static void funnel_cancel_btn_cb(GtkWidget *bt _U_, gpointer data) { - GtkWidget* win = data; + GtkWidget* win = (GtkWidget *)data; window_destroy(GTK_WIDGET(win)); } @@ -413,7 +413,7 @@ static void funnel_new_dialog(const gchar* title, GtkWidget *win, *main_grid, *main_vb, *bbox, *bt_cancel, *bt_ok; guint i; const gchar* fieldname; - struct _funnel_dlg_data* dd = g_malloc(sizeof(struct _funnel_dlg_data)); + struct _funnel_dlg_data* dd = (struct _funnel_dlg_data *)g_malloc(sizeof(struct _funnel_dlg_data)); dd->entries = g_ptr_array_new(); dd->dlg_cb = dlg_cb; @@ -453,11 +453,11 @@ static void funnel_new_dialog(const gchar* title, bbox = dlg_button_row_new(GTK_STOCK_CANCEL,GTK_STOCK_OK, NULL); gtk_box_pack_start(GTK_BOX(main_vb), bbox, FALSE, FALSE, 0); - bt_ok = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_OK); + bt_ok = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_OK); g_signal_connect(bt_ok, "clicked", G_CALLBACK(funnel_dlg_cb), dd); gtk_widget_grab_default(bt_ok); - bt_cancel = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CANCEL); + bt_cancel = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CANCEL); g_signal_connect(bt_cancel, "clicked", G_CALLBACK(funnel_cancel_btn_cb), win); gtk_widget_grab_default(bt_cancel); @@ -539,8 +539,6 @@ static gboolean funnel_open_file(const char* fname, const char* filter, const ch return TRUE; } -typedef struct progdlg _funnel_progress_window_t; - static funnel_progress_window_t* funnel_new_progress_window(const gchar* label, const gchar* task, gboolean terminate_is_stop, gboolean *stop_flag) { return (funnel_progress_window_t*)create_progress_dlg(top_level, label, task, terminate_is_stop, stop_flag); } @@ -594,7 +592,7 @@ typedef struct _menu_cb_t { } menu_cb_t; static void our_menu_callback(void* unused _U_, gpointer data) { - menu_cb_t* mcb = data; + menu_cb_t* mcb = (menu_cb_t *)data; mcb->callback(mcb->callback_data); if (mcb->retap) cf_retap_packets(&cfile); } @@ -622,7 +620,7 @@ static void register_menu_cb(const char *name, gpointer callback_data, gboolean retap) { - menu_cb_t* mcb = g_malloc(sizeof(menu_cb_t)); + menu_cb_t* mcb = (menu_cb_t *)g_malloc(sizeof(menu_cb_t)); const char *label = NULL, *str = NULL; mcb->callback = callback; diff --git a/ui/gtk/gsm_a_stat.c b/ui/gtk/gsm_a_stat.c index 1bc5c8d5cc..235ad07dfd 100644 --- a/ui/gtk/gsm_a_stat.c +++ b/ui/gtk/gsm_a_stat.c @@ -188,7 +188,7 @@ static void gsm_a_stat_reset( void *tapdata) { - gsm_a_stat_t *stat_p = tapdata; + gsm_a_stat_t *stat_p = (gsm_a_stat_t *)tapdata; memset(stat_p, 0, sizeof(gsm_a_stat_t)); } @@ -201,8 +201,8 @@ gsm_a_stat_packet( epan_dissect_t *edt _U_, const void *data) { - gsm_a_stat_t *stat_p = tapdata; - const gsm_a_tap_rec_t *data_p = data; + gsm_a_stat_t *stat_p = (gsm_a_stat_t *)tapdata; + const gsm_a_tap_rec_t *data_p = (gsm_a_tap_rec_t *)data; switch (data_p->pdu_type) { @@ -304,7 +304,7 @@ static void gsm_a_stat_draw( void *tapdata) { - gsm_a_stat_t *stat_p = tapdata; + gsm_a_stat_t *stat_p = (gsm_a_stat_t *)tapdata; if (!tapdata) return; @@ -418,7 +418,7 @@ gsm_a_stat_gtk_win_create( bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - bt_close = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + bt_close = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(dlg_p->win, bt_close, window_cancel_button_cb); g_signal_connect(dlg_p->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/gsm_map_stat.c b/ui/gtk/gsm_map_stat.c index db0ee33df7..b6088949ac 100644 --- a/ui/gtk/gsm_map_stat.c +++ b/ui/gtk/gsm_map_stat.c @@ -275,7 +275,7 @@ static void gsm_map_stat_reset( void *tapdata) { - gsm_map_stat_t *stat_p = tapdata; + gsm_map_stat_t *stat_p = (gsm_map_stat_t *)tapdata; memset(stat_p, 0, sizeof(gsm_map_stat_t)); } @@ -288,8 +288,8 @@ gsm_map_stat_packet( epan_dissect_t *edt _U_, const void *data) { - gsm_map_stat_t *stat_p = tapdata; - const gsm_map_tap_rec_t *data_p = data; + gsm_map_stat_t *stat_p = (gsm_map_stat_t *)tapdata; + const gsm_map_tap_rec_t *data_p = (gsm_map_tap_rec_t *)data; #if 0 /* always false because message_type is 8 bit value */ if (data_p->opr_code_idx > sizeof(stat_p->opr_code)) @@ -320,7 +320,7 @@ static void gsm_map_stat_draw( void *tapdata) { - gsm_map_stat_t *stat_p = tapdata; + gsm_map_stat_t *stat_p = (gsm_map_stat_t *)tapdata; int i; GtkListStore *list_store; GtkTreeIter iter; @@ -412,7 +412,7 @@ gsm_map_stat_gtk_win_create( bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - bt_close = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + bt_close = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(dlg_p->win, bt_close, window_cancel_button_cb); g_signal_connect(dlg_p->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/gsm_map_summary.c b/ui/gtk/gsm_map_summary.c index 80a585e3c1..c3fdcf5c30 100644 --- a/ui/gtk/gsm_map_summary.c +++ b/ui/gtk/gsm_map_summary.c @@ -340,7 +340,7 @@ void gsm_map_stat_gtk_sum_cb(GtkAction *action _U_, gpointer user_data _U_) gtk_box_pack_start(GTK_BOX(main_vb), bbox, TRUE, TRUE, 0); gtk_widget_show(bbox); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(sum_open_w, close_bt, window_cancel_button_cb); g_signal_connect(sum_open_w, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/gtp_stat.c b/ui/gtk/gtp_stat.c index 5e04472a3b..c9beabeb00 100644 --- a/ui/gtk/gtp_stat.c +++ b/ui/gtk/gtp_stat.c @@ -73,7 +73,7 @@ gtpstat_reset(void *pgtp) static int gtpstat_packet(void *pgtp, packet_info *pinfo, epan_dissect_t *edt _U_, const void *psi) { - const gtp_msg_hash_t *gtp=psi; + const gtp_msg_hash_t *gtp=(gtp_msg_hash_t *)psi; gtpstat_t *fs=(gtpstat_t *)pgtp; int idx=0; @@ -151,7 +151,7 @@ gtk_gtpstat_init(const char *opt_arg, void *userdata _U_) filter="gtp"; /*NULL doesn't work here like in LDAP. Too little time/lazy to find out why ?*/ } - gtp=g_malloc(sizeof(gtpstat_t)); + gtp=(gtpstat_t *)g_malloc(sizeof(gtpstat_t)); gtp->win = dlg_window_new("gtp-stat"); /* transient_for top_level */ gtk_window_set_destroy_with_parent (GTK_WINDOW(gtp->win), TRUE); @@ -196,7 +196,7 @@ gtk_gtpstat_init(const char *opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(gtp->win, close_bt, window_cancel_button_cb); g_signal_connect(gtp->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/h225_counter.c b/ui/gtk/h225_counter.c index b9d72fa311..2af0d298ec 100644 --- a/ui/gtk/h225_counter.c +++ b/ui/gtk/h225_counter.c @@ -160,7 +160,7 @@ static int h225counter_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *phi) { h225counter_t *hs=(h225counter_t *)phs; - const h225_packet_info *pi=phi; + const h225_packet_info *pi=(h225_packet_info *)phi; switch (pi->msg_type) { @@ -511,7 +511,7 @@ gtk_h225counter_init(const char *opt_arg, void *userdata _U_) GtkWidget *bbox; GtkWidget *close_bt; - hs=g_malloc(sizeof(h225counter_t)); + hs=(h225counter_t *)g_malloc(sizeof(h225counter_t)); if(strncmp(opt_arg,"h225,counter,",13) == 0){ hs->filter=g_strdup(opt_arg+13); @@ -549,7 +549,7 @@ gtk_h225counter_init(const char *opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_end(GTK_BOX(hs->vbox), bbox, FALSE, FALSE, 0); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(hs->win, close_bt, window_cancel_button_cb); g_signal_connect(hs->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/h225_ras_srt.c b/ui/gtk/h225_ras_srt.c index 17607e7851..0febc7ad8c 100644 --- a/ui/gtk/h225_ras_srt.c +++ b/ui/gtk/h225_ras_srt.c @@ -145,7 +145,7 @@ static int h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *phi) { h225rassrt_t *hs=(h225rassrt_t *)phs; - const h225_packet_info *pi=phi; + const h225_packet_info *pi=(h225_packet_info *)phi; ras_type rasmsg_type = RAS_OTHER; ras_category rascategory = RAS_OTHERS; @@ -157,8 +157,8 @@ h225rassrt_packet(void *phs, packet_info *pinfo _U_, epan_dissect_t *edt _U_, co if (pi->msg_tag < 21) { /* */ - rascategory = pi->msg_tag / 3; - rasmsg_type = pi->msg_tag % 3; + rascategory = (ras_category)(pi->msg_tag / 3); + rasmsg_type = (ras_type)(pi->msg_tag % 3); } else { /* No SRT yet (ToDo) */ @@ -279,7 +279,7 @@ gtk_h225rassrt_init(const char *opt_arg, void *userdata _U_) GtkWidget *bbox; GtkWidget *close_bt; - hs=g_malloc(sizeof(h225rassrt_t)); + hs=(h225rassrt_t *)g_malloc(sizeof(h225rassrt_t)); if(strncmp(opt_arg,"h225,srt,",9) == 0){ hs->filter=g_strdup(opt_arg+9); @@ -316,7 +316,7 @@ gtk_h225rassrt_init(const char *opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_end(GTK_BOX(hs->vbox), bbox, FALSE, FALSE, 0); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(hs->win, close_bt, window_cancel_button_cb); g_signal_connect(hs->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/hostlist_eth.c b/ui/gtk/hostlist_eth.c index a7564f5c2f..add12c9902 100644 --- a/ui/gtk/hostlist_eth.c +++ b/ui/gtk/hostlist_eth.c @@ -43,7 +43,7 @@ static int eth_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { hostlist_table *hosts=(hostlist_table *)pit; - const eth_hdr *ehdr=vip; + const eth_hdr *ehdr=(eth_hdr *)vip; /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) diff --git a/ui/gtk/hostlist_fc.c b/ui/gtk/hostlist_fc.c index cc054792d5..8db5fc4173 100644 --- a/ui/gtk/hostlist_fc.c +++ b/ui/gtk/hostlist_fc.c @@ -45,7 +45,7 @@ static int fc_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { hostlist_table *hosts=(hostlist_table *)pit; - const fc_hdr *fchdr=vip; + const fc_hdr *fchdr=(fc_hdr *)vip; /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) diff --git a/ui/gtk/hostlist_fddi.c b/ui/gtk/hostlist_fddi.c index 8b1c3fb553..2ff3309ef4 100644 --- a/ui/gtk/hostlist_fddi.c +++ b/ui/gtk/hostlist_fddi.c @@ -42,7 +42,7 @@ static int fddi_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { hostlist_table *hosts=(hostlist_table *)pit; - const fddi_hdr *ehdr=vip; + const fddi_hdr *ehdr=(fddi_hdr *)vip; /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) diff --git a/ui/gtk/hostlist_ip.c b/ui/gtk/hostlist_ip.c index 0a4defc731..7528899073 100644 --- a/ui/gtk/hostlist_ip.c +++ b/ui/gtk/hostlist_ip.c @@ -44,7 +44,7 @@ static int ip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { hostlist_table *hosts=(hostlist_table *)pit; - const ws_ip *iph=vip; + const ws_ip *iph=(ws_ip *)vip; /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) diff --git a/ui/gtk/hostlist_ipv6.c b/ui/gtk/hostlist_ipv6.c index 843bb255fd..89f1fba6f5 100644 --- a/ui/gtk/hostlist_ipv6.c +++ b/ui/gtk/hostlist_ipv6.c @@ -45,7 +45,7 @@ static int ipv6_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { hostlist_table *hosts = (hostlist_table *)pit; - const struct ip6_hdr *ip6h = vip; + const struct ip6_hdr *ip6h = (struct ip6_hdr *)vip; address src; address dst; diff --git a/ui/gtk/hostlist_ipx.c b/ui/gtk/hostlist_ipx.c index 701d4c6c01..afb9782825 100644 --- a/ui/gtk/hostlist_ipx.c +++ b/ui/gtk/hostlist_ipx.c @@ -42,7 +42,7 @@ static int ipx_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { hostlist_table *hosts=(hostlist_table *)pit; - const ipxhdr_t *ipxh=vip; + const ipxhdr_t *ipxh=(ipxhdr_t *)vip; /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) diff --git a/ui/gtk/hostlist_jxta.c b/ui/gtk/hostlist_jxta.c index c608d5191f..b9b4a8de30 100644 --- a/ui/gtk/hostlist_jxta.c +++ b/ui/gtk/hostlist_jxta.c @@ -42,7 +42,7 @@ static int jxta_hostlist_packet(void *pit, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *vip) { hostlist_table *hosts = (hostlist_table *) pit; - const jxta_tap_header *jxtahdr = vip; + const jxta_tap_header *jxtahdr = (jxta_tap_header *)vip; /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) diff --git a/ui/gtk/hostlist_rsvp.c b/ui/gtk/hostlist_rsvp.c index c0fa2139dd..8235383a7b 100644 --- a/ui/gtk/hostlist_rsvp.c +++ b/ui/gtk/hostlist_rsvp.c @@ -43,7 +43,7 @@ static int rsvp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { hostlist_table *hosts=(hostlist_table *)pit; - const rsvp_conversation_info *rsvph = vip; + const rsvp_conversation_info *rsvph = (rsvp_conversation_info *)vip; /* Take two "add" passes per packet, adding for each direction, ensures * that all packets are counted properly (even if address is sending to diff --git a/ui/gtk/hostlist_sctp.c b/ui/gtk/hostlist_sctp.c index 6193253bc0..ae81c59743 100644 --- a/ui/gtk/hostlist_sctp.c +++ b/ui/gtk/hostlist_sctp.c @@ -41,7 +41,7 @@ static int sctp_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { hostlist_table *hosts=(hostlist_table *)pit; - const struct _sctp_info *sctphdr=vip; + const struct _sctp_info *sctphdr=(struct _sctp_info *)vip; /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) diff --git a/ui/gtk/hostlist_tcpip.c b/ui/gtk/hostlist_tcpip.c index e78ef5e597..3acb3b7344 100644 --- a/ui/gtk/hostlist_tcpip.c +++ b/ui/gtk/hostlist_tcpip.c @@ -42,7 +42,7 @@ static int tcpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { hostlist_table *hosts=(hostlist_table *)pit; - const struct tcpheader *tcphdr=vip; + const struct tcpheader *tcphdr=(struct tcpheader *)vip; /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) diff --git a/ui/gtk/hostlist_tr.c b/ui/gtk/hostlist_tr.c index 6421899ffd..12865da693 100644 --- a/ui/gtk/hostlist_tr.c +++ b/ui/gtk/hostlist_tr.c @@ -42,7 +42,7 @@ static int tr_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { hostlist_table *hosts=(hostlist_table *)pit; - const tr_hdr *trhdr=vip; + const tr_hdr *trhdr=(tr_hdr *)vip; /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) diff --git a/ui/gtk/hostlist_udpip.c b/ui/gtk/hostlist_udpip.c index 033d8f8d0f..695d6cb49b 100644 --- a/ui/gtk/hostlist_udpip.c +++ b/ui/gtk/hostlist_udpip.c @@ -42,7 +42,7 @@ static int udpip_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { hostlist_table *hosts=(hostlist_table *)pit; - const e_udphdr *udphdr=vip; + const e_udphdr *udphdr=(e_udphdr *)vip; /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) diff --git a/ui/gtk/hostlist_wlan.c b/ui/gtk/hostlist_wlan.c index a1e9ade7e5..619e1d77c1 100644 --- a/ui/gtk/hostlist_wlan.c +++ b/ui/gtk/hostlist_wlan.c @@ -42,7 +42,7 @@ static int wlan_hostlist_packet(void *pit, packet_info *pinfo, epan_dissect_t *edt _U_, const void *vip) { hostlist_table *hosts=(hostlist_table *)pit; - const wlan_hdr *whdr=vip; + const wlan_hdr *whdr=(wlan_hdr *)vip; /* Take two "add" passes per packet, adding for each direction, ensures that all packets are counted properly (even if address is sending to itself) diff --git a/ui/gtk/iax2_analysis.c b/ui/gtk/iax2_analysis.c index 2942e7a88f..751c58b53f 100644 --- a/ui/gtk/iax2_analysis.c +++ b/ui/gtk/iax2_analysis.c @@ -288,7 +288,7 @@ static void dialog_graph_reset(user_data_t* user_data); static void iax2_reset(void *user_data_arg) { - user_data_t *user_data = user_data_arg; + user_data_t *user_data = (user_data_t *)user_data_arg; user_data->forward.statinfo.first_packet = TRUE; user_data->reversed.statinfo.first_packet = TRUE; user_data->forward.statinfo.max_delta = 0; @@ -446,8 +446,8 @@ static void iax2_packet_save_payload(tap_iax2_save_info_t *saveinfo, static gboolean iax2_packet(void *user_data_arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *iax2info_arg) { - user_data_t *user_data = user_data_arg; - const struct _iax2_info_t *iax2info = iax2info_arg; + user_data_t *user_data = (user_data_t *)user_data_arg; + const struct _iax2_info_t *iax2info = (struct _iax2_info_t *)iax2info_arg; /* we ignore packets that are not displayed */ if (pinfo->fd->flags.passed_dfilter == 0) @@ -754,7 +754,7 @@ iax2_packet_save_payload(tap_iax2_save_info_t *saveinfo, static void on_iax2_window_destroy(GtkWidget *win _U_, gpointer data) { - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; /* remove tap listener */ remove_tap_listener(user_data); @@ -799,7 +799,7 @@ on_notebook_switch_page(GtkNotebook *notebook _U_, gint page_num, gpointer data) { - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; user_data->dlg.selected_list = (page_num == 0) ? user_data->dlg.list_fwd : user_data->dlg.list_rev ; @@ -812,7 +812,7 @@ static void on_list_select_row(GtkTreeSelection *selection, gpointer data) { - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; user_data->dlg.selected_list_sel = selection; } @@ -1443,7 +1443,7 @@ dialog_graph_redraw(user_data_t* user_data) static void draw_area_destroy_cb(GtkWidget *widget _U_, gpointer data) { - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; user_data->dlg.dialog_graph.window = NULL; } @@ -1468,7 +1468,7 @@ gboolean draw_area_draw(GtkWidget *widget, cairo_t *cr, gpointer data) static gboolean draw_area_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data) { - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; cairo_t *cr = gdk_cairo_create (gtk_widget_get_window(widget)); #if GTK_CHECK_VERSION(2,22,0) @@ -1488,7 +1488,7 @@ draw_area_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data) static gboolean draw_area_configure_event(GtkWidget *widget, GdkEventConfigure *event _U_, gpointer data) { - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; GtkAllocation widget_alloc; cairo_t *cr; @@ -1535,7 +1535,7 @@ draw_area_configure_event(GtkWidget *widget, GdkEventConfigure *event _U_, gpoin static void scrollbar_changed(GtkWidget *widget _U_, gpointer data) { - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; guint32 mi; mi = (guint32) (gtk_adjustment_get_value(user_data->dlg.dialog_graph.scrollbar_adjustment) @@ -1597,7 +1597,7 @@ disable_graph(dialog_graph_graph_t *dgg) static void filter_box_display_button_cb(GtkWidget *widget _U_, gpointer data) { - dialog_graph_graph_t *dgg = data; + dialog_graph_graph_t *dgg = (dialog_graph_graph_t *)data; /* this graph is not active, just update display and redraw */ if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(dgg->display_button))) { @@ -1688,7 +1688,7 @@ static void yscale_select(GtkWidget *item, gpointer data) { int i; - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; i = gtk_combo_box_get_active (GTK_COMBO_BOX(item)); @@ -1701,7 +1701,7 @@ static void pixels_per_tick_select(GtkWidget *item, gpointer data) { int i; - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; i = gtk_combo_box_get_active (GTK_COMBO_BOX(item)); @@ -1713,7 +1713,7 @@ pixels_per_tick_select(GtkWidget *item, gpointer data) static void tick_interval_select(GtkWidget *item, gpointer data) { - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; int i; i = gtk_combo_box_get_active (GTK_COMBO_BOX(item)); @@ -1891,7 +1891,7 @@ dialog_graph_init_window(user_data_t* user_data) gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); gtk_widget_show(hbox); - bt_close = g_object_get_data(G_OBJECT(hbox), GTK_STOCK_CLOSE); + bt_close = (GtkWidget *)g_object_get_data(G_OBJECT(hbox), GTK_STOCK_CLOSE); window_set_cancel_button(user_data->dlg.dialog_graph.window, bt_close, window_cancel_button_cb); g_signal_connect(user_data->dlg.dialog_graph.window, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); @@ -1906,7 +1906,7 @@ dialog_graph_init_window(user_data_t* user_data) static void on_graph_bt_clicked(GtkWidget *bt _U_, gpointer data) { - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; if (user_data->dlg.dialog_graph.window != NULL) { /* There's already a graph window; reactivate it. */ @@ -1922,7 +1922,7 @@ on_graph_bt_clicked(GtkWidget *bt _U_, gpointer data) static void on_goto_bt_clicked(GtkWidget *bt _U_, gpointer data) { - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; GtkTreeIter iter; GtkTreeModel *model; GtkTreeSelection *selection; @@ -1947,7 +1947,7 @@ static void draw_stat(user_data_t *user_data); static void on_refresh_bt_clicked(GtkWidget *bt _U_, gpointer data) { - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; GString *error_string; /* remove tap listener */ @@ -1974,7 +1974,7 @@ on_refresh_bt_clicked(GtkWidget *bt _U_, gpointer data) static void on_next_bt_clicked(GtkWidget *bt _U_, gpointer data) { - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; GtkTreeIter iter; GtkTreeModel *model; gchar *text; @@ -2047,8 +2047,8 @@ save_csv_as_ok_cb(GtkWidget *w _U_, gpointer fc /*user_data_t *user_data*/) /* It's a directory - set the file selection box to display it. */ set_last_open_dir(g_dest); g_free(g_dest); - file_selection_set_current_folder(fc, get_last_open_dir()); - gtk_file_chooser_set_current_name(fc, ""); + file_selection_set_current_folder((GtkWidget *)fc, get_last_open_dir()); + gtk_file_chooser_set_current_name((GtkFileChooser *)fc, ""); return FALSE; /* run the dialog again */ } rev = (GtkWidget*)g_object_get_data(G_OBJECT(fc), "reversed_rb"); @@ -2217,7 +2217,7 @@ save_csv_as_ok_cb(GtkWidget *w _U_, gpointer fc /*user_data_t *user_data*/) static void save_csv_as_destroy_cb(GtkWidget *win _U_, gpointer data) { - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; user_data->dlg.save_csv_as_w = NULL; } @@ -2226,7 +2226,7 @@ static void save_csv_as_destroy_cb(GtkWidget *win _U_, gpointer data) static void save_csv_as_cb(GtkWidget *bt _U_, gpointer data) { - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; GtkWidget *vertb; GtkWidget *grid1; GtkWidget *label_format; @@ -2336,7 +2336,7 @@ save_csv_as_cb(GtkWidget *bt _U_, gpointer data) /****************************************************************************/ static void save_voice_as_destroy_cb(GtkWidget *win _U_, gpointer data) { - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; /* Note that we no longer have a Save voice info dialog box. */ user_data->dlg.save_voice_as_w = NULL; @@ -2695,8 +2695,8 @@ static gboolean save_voice_as_ok_cb(GtkWidget *w _U_, gpointer fc) if (test_for_directory(g_dest) == EISDIR) { /* It's a directory - set the file selection box to display it. */ set_last_open_dir(g_dest); - file_selection_set_current_folder(fc, get_last_open_dir()); - gtk_file_chooser_set_current_name(fc, ""); + file_selection_set_current_folder((GtkWidget *)fc, get_last_open_dir()); + gtk_file_chooser_set_current_name((GtkFileChooser *)fc, ""); g_free(g_dest); return FALSE; /* run the dialog again */ } @@ -2868,7 +2868,7 @@ static gboolean save_voice_as_ok_cb(GtkWidget *w _U_, gpointer fc) /* XXX support for different formats is currently commented out */ static void save_voice_as_cb(GtkWidget *bt _U_, gpointer data) { - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; GtkWidget *vertb; GtkWidget *grid1; GtkWidget *label_format; @@ -3590,7 +3590,7 @@ iax2_analysis( char *tempname; /* init */ - user_data = g_malloc(sizeof(user_data_t)); + user_data = (user_data_t *)g_malloc(sizeof(user_data_t)); COPY_ADDRESS(&(user_data->ip_src_fwd), ip_src_fwd); user_data->port_src_fwd = port_src_fwd; diff --git a/ui/gtk/io_stat.c b/ui/gtk/io_stat.c index 7e7829abbf..cd5cea486e 100644 --- a/ui/gtk/io_stat.c +++ b/ui/gtk/io_stat.c @@ -232,7 +232,7 @@ io_stat_reset(io_stat_t *io) for (i=0; igraphs[i].items[j]; + ioi = (io_item_t *)io->graphs[i].items[j]; ioi->frames = 0; ioi->bytes = 0; @@ -264,7 +264,7 @@ io_stat_reset(io_stat_t *io) static void tap_iostat_reset(void *g) { - io_stat_graph_t *gio = g; + io_stat_graph_t *gio = (io_stat_graph_t *)g; io_stat_reset(gio->io); } @@ -272,7 +272,7 @@ tap_iostat_reset(void *g) static gboolean tap_iostat_packet(void *g, packet_info *pinfo, epan_dissect_t *edt, const void *dummy _U_) { - io_stat_graph_t *graph = g; + io_stat_graph_t *graph = (io_stat_graph_t *)g; io_stat_t *io; io_item_t *it; nstime_t time_delta; @@ -317,7 +317,7 @@ tap_iostat_packet(void *g, packet_info *pinfo, epan_dissect_t *edt, const void * } /* Point to the appropriate io_item_t struct */ - it = graph->items[idx]; + it = (io_item_t *)graph->items[idx]; /* Set the first and last frame num in current interval matching the target field+filter */ if (it->first_frame_in_invl == 0) { @@ -410,7 +410,7 @@ tap_iostat_packet(void *g, packet_info *pinfo, epan_dissect_t *edt, const void * it->fields++; break; case FT_RELATIVE_TIME: - new_time = fvalue_get(&((field_info *)gp->pdata[0])->value); + new_time = (nstime_t *)fvalue_get(&((field_info *)gp->pdata[0])->value); switch (graph->calc_type) { guint64 t, pt; /* time in us */ @@ -506,7 +506,7 @@ get_it_value(io_stat_t *io, int graph, int idx) io_item_t *it; guint32 interval; - it = io->graphs[graph].items[idx]; + it = (io_item_t *)io->graphs[graph].items[idx]; switch (io->count_type) { case COUNT_TYPE_FRAMES: @@ -1268,7 +1268,7 @@ io_stat_redraw(io_stat_t *io) static void tap_iostat_draw(void *g) { - io_stat_graph_t *git = g; + io_stat_graph_t *git = (io_stat_graph_t *)g; io_stat_draw(git->io); } @@ -1448,10 +1448,10 @@ iostat_init(const char *opt_arg _U_, void* userdata _U_) static void draw_area_destroy_cb(GtkWidget *widget _U_, gpointer user_data) { - io_stat_t *io = user_data; + io_stat_t *io = (io_stat_t *)user_data; int i,j; - GtkWidget *save_bt = g_object_get_data(G_OBJECT(io->window), "save_bt"); - surface_info_t *surface_info = g_object_get_data(G_OBJECT(save_bt), "surface-info"); + GtkWidget *save_bt = (GtkWidget *)g_object_get_data(G_OBJECT(io->window), "save_bt"); + surface_info_t *surface_info = (surface_info_t *)g_object_get_data(G_OBJECT(save_bt), "surface-info"); g_free(surface_info); @@ -1478,7 +1478,7 @@ draw_area_destroy_cb(GtkWidget *widget _U_, gpointer user_data) static gboolean pixmap_clicked_event(GtkWidget *widget _U_, GdkEventButton *event, gpointer g) { - io_stat_t *io = g; + io_stat_t *io = (io_stat_t *)g; io_stat_graph_t *graph; io_item_t *it; guint32 draw_width, interval, last_interval; @@ -1527,7 +1527,7 @@ pixmap_clicked_event(GtkWidget *widget _U_, GdkEventButton *event, gpointer g) for (i=0; igraphs[i]; if (graph->display) { - it = graph->items[interval]; + it = (io_item_t *)graph->items[interval]; if (event->button == 1) { if ((frame_num == 0) || (it->first_frame_in_invl < frame_num)) frame_num = it->first_frame_in_invl; @@ -1562,7 +1562,7 @@ pixmap_clicked_event(GtkWidget *widget _U_, GdkEventButton *event, gpointer g) static gboolean draw_area_configure_event(GtkWidget *widget, GdkEventConfigure *event _U_, gpointer user_data) { - io_stat_t *io = user_data; + io_stat_t *io = (io_stat_t *)user_data; GtkWidget *save_bt; GtkAllocation widget_alloc; cairo_t *cr; @@ -1598,7 +1598,7 @@ draw_area_configure_event(GtkWidget *widget, GdkEventConfigure *event _U_, gpoin io->surface_width = widget_alloc.width; io->surface_height = widget_alloc.height; - save_bt = g_object_get_data(G_OBJECT(io->window), "save_bt"); + save_bt = (GtkWidget *)g_object_get_data(G_OBJECT(io->window), "save_bt"); #if GTK_CHECK_VERSION(2,22,0) surface_info->surface = io->surface; surface_info->width = widget_alloc.width; @@ -1625,7 +1625,7 @@ draw_area_configure_event(GtkWidget *widget, GdkEventConfigure *event _U_, gpoin static void scrollbar_changed(GtkWidget *widget _U_, gpointer user_data) { - io_stat_t *io = user_data; + io_stat_t *io = (io_stat_t *)user_data; guint32 mi; mi = (guint32) (gtk_adjustment_get_value(io->scrollbar_adjustment) @@ -1643,7 +1643,7 @@ scrollbar_changed(GtkWidget *widget _U_, gpointer user_data) static gboolean draw_area_draw(GtkWidget *widget, cairo_t *cr, gpointer user_data) { - io_stat_t *io = user_data; + io_stat_t *io = (io_stat_t *)user_data; GtkAllocation allocation; gtk_widget_get_allocation (widget, &allocation); @@ -1658,7 +1658,7 @@ draw_area_draw(GtkWidget *widget, cairo_t *cr, gpointer user_data) static gboolean draw_area_expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data) { - io_stat_t *io = user_data; + io_stat_t *io = (io_stat_t *)user_data; cairo_t *cr = gdk_cairo_create (gtk_widget_get_window(widget)); #if GTK_CHECK_VERSION(2,22,0) @@ -1706,7 +1706,7 @@ create_draw_area(io_stat_t *io, GtkWidget *box) static void tick_interval_select(GtkWidget *item, gpointer user_data) { - io_stat_t *io = user_data; + io_stat_t *io = (io_stat_t *)user_data; int i; i = gtk_combo_box_get_active (GTK_COMBO_BOX(item)); @@ -1720,7 +1720,7 @@ tick_interval_select(GtkWidget *item, gpointer user_data) static void pixels_per_tick_select(GtkWidget *item, gpointer user_data) { - io_stat_t *io = user_data; + io_stat_t *io = (io_stat_t *)user_data; int i; i = gtk_combo_box_get_active (GTK_COMBO_BOX(item)); @@ -1731,7 +1731,7 @@ pixels_per_tick_select(GtkWidget *item, gpointer user_data) static void plot_style_select(GtkWidget *item, gpointer user_data) { - io_stat_graph_t *ppt = user_data; + io_stat_graph_t *ppt = (io_stat_graph_t *)user_data; int val; val = gtk_combo_box_get_active (GTK_COMBO_BOX(item)); @@ -1763,7 +1763,7 @@ create_pixels_per_tick_menu_items(io_stat_t *io) static void yscale_select(GtkWidget *item, gpointer user_data) { - io_stat_t *io = user_data; + io_stat_t *io = (io_stat_t *)user_data; int i; i = gtk_combo_box_get_active (GTK_COMBO_BOX(item)); @@ -1775,7 +1775,7 @@ yscale_select(GtkWidget *item, gpointer user_data) static void filter_select(GtkWidget *item, gpointer user_data) { - io_stat_t *io = user_data; + io_stat_t *io = (io_stat_t *)user_data; int i; i = gtk_combo_box_get_active (GTK_COMBO_BOX(item)); @@ -1866,7 +1866,7 @@ create_filter_menu_items(io_stat_t *io) static void count_type_select(GtkWidget *item, gpointer user_data) { - io_stat_t *io = user_data; + io_stat_t *io = (io_stat_t *)user_data; int i; GtkAllocation widget_alloc; static gboolean advanced_visible = FALSE; @@ -1937,7 +1937,7 @@ create_ctrl_menu(io_stat_t *io, GtkWidget *box, const char *name, GtkWidget * (* static void view_as_time_toggle_dest(GtkWidget *widget _U_, gpointer user_data) { - io_stat_t *io = user_data; + io_stat_t *io = (io_stat_t *)user_data; io->view_as_time = io->view_as_time ? FALSE : TRUE; @@ -1993,7 +1993,7 @@ create_ctrl_area(io_stat_t *io, GtkWidget *box) static void filter_callback(GtkWidget *widget, gpointer user_data) { - io_stat_graph_t *gio = user_data; + io_stat_graph_t *gio = (io_stat_graph_t *)user_data; const char *filter; const char *field = NULL; header_field_info *hfi; @@ -2117,7 +2117,7 @@ filter_callback(GtkWidget *widget, gpointer user_data) static void calc_type_select(GtkWidget *item, gpointer user_data) { - io_stat_graph_t *gio = user_data; + io_stat_graph_t *gio = (io_stat_graph_t *)user_data; gio->calc_type = gtk_combo_box_get_active (GTK_COMBO_BOX(item)); @@ -2196,7 +2196,7 @@ create_advanced_box(io_stat_graph_t *gio, GtkWidget *box) static void filter_button_clicked(GtkWidget *w, gpointer user_data) { - io_stat_graph_t *gio = user_data; + io_stat_graph_t *gio = (io_stat_graph_t *)user_data; display_filter_construct_cb(w, gio->args); return; @@ -2205,7 +2205,7 @@ filter_button_clicked(GtkWidget *w, gpointer user_data) static void smooth_filter_toggled(GtkWidget *w, gpointer user_data) { - io_stat_graph_t *gio = user_data; + io_stat_graph_t *gio = (io_stat_graph_t *)user_data; gio->follow_smooth = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(w)); @@ -2348,7 +2348,7 @@ copy_as_csv_cb(GtkWindow *copy_bt _U_, gpointer user_data) char string[15]; GtkClipboard *cb; GString *CSV_str = g_string_new(""); - io_stat_t *io = user_data; + io_stat_t *io = (io_stat_t *)user_data; g_string_append(CSV_str, "\"Interval start\""); for (i=0; iwindow, close_bt, window_cancel_button_cb); gtk_widget_set_tooltip_text(close_bt, "Close this dialog"); - save_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_SAVE); + save_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_SAVE); gtk_widget_set_sensitive(save_bt, FALSE); gtk_widget_set_tooltip_text(save_bt, "Save the displayed graph to a file"); g_signal_connect(save_bt, "clicked", G_CALLBACK(pixmap_save_cb), NULL); g_object_set_data(G_OBJECT(io->window), "save_bt", save_bt); - copy_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_COPY); + copy_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_COPY); gtk_widget_set_tooltip_text(copy_bt, "Copy values from selected graphs to the clipboard in" " CSV (Comma Separated Values) format"); g_signal_connect(copy_bt, "clicked", G_CALLBACK(copy_as_csv_cb), io); - help_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP); + help_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP); g_signal_connect(help_bt, "clicked", G_CALLBACK(topic_cb), (gpointer)HELP_STATS_IO_GRAPH_DIALOG); gtk_widget_set_tooltip_text (help_bt, "Show topic specific help"); g_signal_connect(io->window, "delete-event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/ldap_stat.c b/ui/gtk/ldap_stat.c index 828cc30ff9..3eda8d6d45 100644 --- a/ui/gtk/ldap_stat.c +++ b/ui/gtk/ldap_stat.c @@ -72,7 +72,7 @@ ldapstat_reset(void *pldap) static int ldapstat_packet(void *pldap, packet_info *pinfo, epan_dissect_t *edt _U_, const void *psi) { - const ldap_call_response_t *ldap=psi; + const ldap_call_response_t *ldap=(ldap_call_response_t *)psi; ldapstat_t *fs=(ldapstat_t *)pldap; /* we are only interested in reply packets */ @@ -145,7 +145,7 @@ gtk_ldapstat_init(const char *opt_arg, void *userdata _U_) filter=NULL; } - ldap=g_malloc(sizeof(ldapstat_t)); + ldap=(ldapstat_t *)g_malloc(sizeof(ldapstat_t)); ldap->win = dlg_window_new("ldap-stat"); gtk_window_set_destroy_with_parent (GTK_WINDOW(ldap->win), TRUE); @@ -210,7 +210,7 @@ gtk_ldapstat_init(const char *opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(ldap->win, close_bt, window_cancel_button_cb); g_signal_connect(ldap->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/mac_lte_stat_dlg.c b/ui/gtk/mac_lte_stat_dlg.c index 84ac7e2b6d..47a8bd3819 100644 --- a/ui/gtk/mac_lte_stat_dlg.c +++ b/ui/gtk/mac_lte_stat_dlg.c @@ -273,7 +273,7 @@ static mac_lte_ep_t* alloc_mac_lte_ep(const struct mac_lte_tap_info *si, packet_ return NULL; } - if (!(ep = g_malloc(sizeof(mac_lte_ep_t)))) { + if (!(ep = (mac_lte_ep_t *)g_malloc(sizeof(mac_lte_ep_t)))) { return NULL; } @@ -1044,7 +1044,7 @@ gtk_mac_lte_stat_init(const char *opt_arg, void *userdata _U_) /* Create dialog */ - hs = g_malloc(sizeof(mac_lte_stat_t)); + hs = (mac_lte_stat_t *)g_malloc(sizeof(mac_lte_stat_t)); hs->ep_list = NULL; /* Copy filter (so can be used for window title at reset) */ @@ -1367,10 +1367,10 @@ gtk_mac_lte_stat_init(const char *opt_arg, void *userdata _U_) gtk_box_pack_end (GTK_BOX(top_level_vbox), bbox, FALSE, FALSE, 0); /* Add the close button */ - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(hs->mac_lte_stat_dlg_w, close_bt, window_cancel_button_cb); - help_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP); + help_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP); g_signal_connect(help_bt, "clicked", G_CALLBACK(topic_cb), (gpointer)HELP_STATS_LTE_MAC_TRAFFIC_DIALOG); /* Set callbacks */ diff --git a/ui/gtk/megaco_stat.c b/ui/gtk/megaco_stat.c index 3de49de95a..5ff91f7b6b 100644 --- a/ui/gtk/megaco_stat.c +++ b/ui/gtk/megaco_stat.c @@ -158,7 +158,7 @@ gtk_megacostat_init(const char *opt_arg, void *userdata _U_) return; } - ms=g_malloc(sizeof(megacostat_t)); + ms=(megacostat_t *)g_malloc(sizeof(megacostat_t)); if(strncmp(opt_arg,"megaco,srt,",11) == 0){ ms->filter=g_strdup(opt_arg+11); @@ -195,7 +195,7 @@ gtk_megacostat_init(const char *opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_start(GTK_BOX(ms->vbox), bbox, FALSE, FALSE, 0); - bt_close = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + bt_close = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(ms->win, bt_close, window_cancel_button_cb); g_signal_connect(ms->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/mgcp_stat.c b/ui/gtk/mgcp_stat.c index 95a4a6c7a7..bd53ab665d 100644 --- a/ui/gtk/mgcp_stat.c +++ b/ui/gtk/mgcp_stat.c @@ -106,7 +106,7 @@ static int mgcpstat_packet(void *pms, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pmi) { mgcpstat_t *ms=(mgcpstat_t *)pms; - const mgcp_info_t *mi=pmi; + const mgcp_info_t *mi=(mgcp_info_t *)pmi; nstime_t delta; int ret = 0; @@ -245,7 +245,7 @@ gtk_mgcpstat_init(const char *opt_arg, void *userdata _U_) GtkWidget *bt_close; GtkWidget *bbox; - ms=g_malloc(sizeof(mgcpstat_t)); + ms=(mgcpstat_t *)g_malloc(sizeof(mgcpstat_t)); if(strncmp(opt_arg,"mgcp,srt,",9) == 0){ ms->filter=g_strdup(opt_arg+9); @@ -282,7 +282,7 @@ gtk_mgcpstat_init(const char *opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_start(GTK_BOX(ms->vbox), bbox, FALSE, FALSE, 0); - bt_close = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + bt_close = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(ms->win, bt_close, window_cancel_button_cb); g_signal_connect(ms->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/mtp3_stat.c b/ui/gtk/mtp3_stat.c index 6537db3097..d826e6b300 100644 --- a/ui/gtk/mtp3_stat.c +++ b/ui/gtk/mtp3_stat.c @@ -213,7 +213,7 @@ static void mtp3_stat_reset( void *tapdata) { - mtp3_stat_t (*stat_p)[MTP3_MAX_NUM_OPC_DPC] = tapdata; + mtp3_stat_t (*stat_p)[MTP3_MAX_NUM_OPC_DPC] = (mtp3_stat_t(*)[MTP3_MAX_NUM_OPC_DPC])tapdata; mtp3_num_used = 0; memset(stat_p, 0, MTP3_MAX_NUM_OPC_DPC * sizeof(mtp3_stat_t)); @@ -232,8 +232,8 @@ mtp3_stat_packet( epan_dissect_t *edt _U_, const void *data) { - mtp3_stat_t (*stat_p)[MTP3_MAX_NUM_OPC_DPC] = tapdata; - const mtp3_tap_rec_t *data_p = data; + mtp3_stat_t (*stat_p)[MTP3_MAX_NUM_OPC_DPC] = (mtp3_stat_t(*)[MTP3_MAX_NUM_OPC_DPC])tapdata; + const mtp3_tap_rec_t *data_p = (mtp3_tap_rec_t *)data; int i; if (data_p->si_code >= MTP3_NUM_SI_CODE) @@ -288,7 +288,7 @@ static void mtp3_stat_draw( void *tapdata) { - mtp3_stat_t (*stat_p)[MTP3_MAX_NUM_OPC_DPC] = tapdata; + mtp3_stat_t (*stat_p)[MTP3_MAX_NUM_OPC_DPC] = (mtp3_stat_t(*)[MTP3_MAX_NUM_OPC_DPC])tapdata; int i,j; char *str; float avg; @@ -300,7 +300,7 @@ mtp3_stat_draw( return; } - str=ep_alloc(256); + str=(char *)ep_alloc(256); i = 0; list_store = GTK_LIST_STORE(gtk_tree_view_get_model(GTK_TREE_VIEW (dlg.table))); /* Get store */ @@ -382,7 +382,7 @@ mtp3_stat_gtk_win_create( bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - bt_close = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + bt_close = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(dlg_p->win, bt_close, window_cancel_button_cb); g_signal_connect(dlg_p->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/mtp3_summary.c b/ui/gtk/mtp3_summary.c index c069d2af84..ed3ff11d57 100644 --- a/ui/gtk/mtp3_summary.c +++ b/ui/gtk/mtp3_summary.c @@ -430,7 +430,7 @@ mtp3_sum_gtk_sum_cb(GtkAction *action _U_, gpointer user_data _U_) gtk_box_pack_start(GTK_BOX(main_vb), bbox, FALSE, FALSE, 0); gtk_widget_show(bbox); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(sum_open_w, close_bt, window_cancel_button_cb); g_signal_connect(sum_open_w, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/ncp_stat.c b/ui/gtk/ncp_stat.c index bcf3cf90c1..8bf7ee3ed3 100644 --- a/ui/gtk/ncp_stat.c +++ b/ui/gtk/ncp_stat.c @@ -303,7 +303,7 @@ static int ncpstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const void *prv) { ncpstat_t *ss=(ncpstat_t *)pss; - const ncp_req_hash_value *request_val=prv; + const ncp_req_hash_value *request_val=(ncp_req_hash_value *)prv; /* if we havent seen the request, just ignore it */ if(!request_val || request_val->ncp_rec==0){ @@ -500,7 +500,7 @@ gtk_ncpstat_init(const char *opt_arg, void *userdata _U_) filter=NULL; } - ss=g_malloc(sizeof(ncpstat_t)); + ss=(ncpstat_t *)g_malloc(sizeof(ncpstat_t)); ss->win = dlg_window_new("ncp-stat"); /* transient_for top_level */ gtk_window_set_destroy_with_parent (GTK_WINDOW(ss->win), TRUE); @@ -694,7 +694,7 @@ gtk_ncpstat_init(const char *opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(ss->win, close_bt, window_cancel_button_cb); g_signal_connect(ss->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/radius_stat.c b/ui/gtk/radius_stat.c index dcc3238b2f..608a52e5a1 100644 --- a/ui/gtk/radius_stat.c +++ b/ui/gtk/radius_stat.c @@ -129,7 +129,7 @@ static int radiusstat_packet(void *prs, packet_info *pinfo, epan_dissect_t *edt _U_, const void *pri) { radiusstat_t *rs=(radiusstat_t *)prs; - const radius_info_t *ri=pri; + const radius_info_t *ri=(radius_info_t *)pri; nstime_t delta; radius_category radius_cat = RADIUS_CAT_OTHERS; int ret = 0; @@ -315,7 +315,7 @@ gtk_radiusstat_init(const char *opt_arg, void *userdata _U_) GtkWidget *bt_close; GtkWidget *bbox; - rs=g_malloc(sizeof(radiusstat_t)); + rs=(radiusstat_t *)g_malloc(sizeof(radiusstat_t)); if(strncmp(opt_arg,"radius,srt,",11) == 0){ rs->filter=g_strdup(opt_arg+11); @@ -351,7 +351,7 @@ gtk_radiusstat_init(const char *opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_start(GTK_BOX(rs->vbox), bbox, FALSE, FALSE, 0); - bt_close = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + bt_close = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(rs->win, bt_close, window_cancel_button_cb); g_signal_connect(rs->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/rlc_lte_graph.c b/ui/gtk/rlc_lte_graph.c index 81dc963bac..74629f1bb1 100644 --- a/ui/gtk/rlc_lte_graph.c +++ b/ui/gtk/rlc_lte_graph.c @@ -2186,7 +2186,7 @@ static gboolean motion_notify_event(GtkWidget *widget _U_, GdkEventMotion *event else { x = (int) event->x; y = (int) event->y; - state = event->state; + state = (GdkModifierType)event->state; } if (state & GDK_BUTTON3_MASK) { diff --git a/ui/gtk/rlc_lte_stat_dlg.c b/ui/gtk/rlc_lte_stat_dlg.c index 83d6a4c3c5..700ee6a17d 100644 --- a/ui/gtk/rlc_lte_stat_dlg.c +++ b/ui/gtk/rlc_lte_stat_dlg.c @@ -321,7 +321,7 @@ static rlc_lte_ep_t* alloc_rlc_lte_ep(const struct rlc_lte_tap_info *si, packet_ return NULL; } - if (!(ep = g_malloc(sizeof(rlc_lte_ep_t)))) { + if (!(ep = (rlc_lte_ep_t *)g_malloc(sizeof(rlc_lte_ep_t)))) { return NULL; } @@ -1295,7 +1295,7 @@ static void gtk_rlc_lte_stat_init(const char *opt_arg, void *userdata _U_) /* Create dialog */ - hs = g_malloc(sizeof(rlc_lte_stat_t)); + hs = (rlc_lte_stat_t *)g_malloc(sizeof(rlc_lte_stat_t)); hs->ep_list = NULL; /* Copy filter (so can be used for window title at reset) */ @@ -1624,10 +1624,10 @@ static void gtk_rlc_lte_stat_init(const char *opt_arg, void *userdata _U_) gtk_box_pack_end(GTK_BOX(top_level_vbox), bbox, FALSE, FALSE, 0); /* Add the close button */ - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(hs->dlg_w, close_bt, window_cancel_button_cb); - help_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP); + help_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP); g_signal_connect(help_bt, "clicked", G_CALLBACK(topic_cb), (gpointer)HELP_STATS_LTE_RLC_TRAFFIC_DIALOG); /* Set callbacks */ diff --git a/ui/gtk/rpc_progs.c b/ui/gtk/rpc_progs.c index 4d5fa4e52b..f57f4d6904 100644 --- a/ui/gtk/rpc_progs.c +++ b/ui/gtk/rpc_progs.c @@ -203,13 +203,13 @@ add_new_program(rpc_program_t *rp) static gboolean rpcprogs_packet(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void *arg) { - const rpc_call_info_value *ri = arg; + const rpc_call_info_value *ri = (rpc_call_info_value *)arg; nstime_t delta; rpc_program_t *rp; if (!prog_list) { /* the list was empty */ - rp = g_malloc(sizeof(rpc_program_t)); + rp = (rpc_program_t *)g_malloc(sizeof(rpc_program_t)); add_new_program(rp); rp->next = NULL; rp->program = ri->prog; @@ -220,7 +220,7 @@ rpcprogs_packet(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co } else if ( (ri->prog < prog_list->program) || ((ri->prog == prog_list->program) && (ri->vers < prog_list->version))) { /* we should be first entry in list */ - rp = g_malloc(sizeof(rpc_program_t)); + rp = (rpc_program_t *)g_malloc(sizeof(rpc_program_t)); add_new_program(rp); rp->next = prog_list; rp->program = ri->prog; @@ -240,7 +240,7 @@ rpcprogs_packet(void *dummy _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co || ( (rp->next->program == ri->prog) && (rp->next->version > ri->vers))) { rpc_program_t *trp; - trp = g_malloc(sizeof(rpc_program_t)); + trp = (rpc_program_t *)g_malloc(sizeof(rpc_program_t)); add_new_program(trp); trp->next = rp->next; trp->program = ri->prog; @@ -406,7 +406,7 @@ gtk_rpcprogs_init(const char *opt_arg _U_, void* userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_start(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - bt_close = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + bt_close = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(win, bt_close, window_cancel_button_cb); g_signal_connect(win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/rpc_stat.c b/ui/gtk/rpc_stat.c index 90022701fe..dc88de696b 100644 --- a/ui/gtk/rpc_stat.c +++ b/ui/gtk/rpc_stat.c @@ -91,7 +91,7 @@ rpcstat_set_title(rpcstat_t *rs) static void rpcstat_reset(void *arg) { - rpcstat_t *rs = arg; + rpcstat_t *rs = (rpcstat_t *)arg; reset_srt_table_data(&rs->srt_table); rpcstat_set_title(rs); @@ -101,8 +101,8 @@ rpcstat_reset(void *arg) static gboolean rpcstat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *arg2) { - rpcstat_t *rs = arg; - const rpc_call_info_value *ri = arg2; + rpcstat_t *rs = (rpcstat_t *)arg; + const rpc_call_info_value *ri = (rpc_call_info_value *)arg2; /* we are only interested in reply packets */ if(ri->request){ @@ -137,7 +137,7 @@ rpcstat_packet(void *arg, packet_info *pinfo, epan_dissect_t *edt _U_, const voi static void rpcstat_draw(void *arg) { - rpcstat_t *rs = arg; + rpcstat_t *rs = (rpcstat_t *)arg; draw_srt_table_data(&rs->srt_table); } @@ -243,7 +243,7 @@ gtk_rpcstat_init(const char *opt_arg, void* userdata _U_) rpc_program=program; rpc_version=version; - rs=g_malloc(sizeof(rpcstat_t)); + rs=(rpcstat_t *)g_malloc(sizeof(rpcstat_t)); rs->prog=rpc_prog_name(rpc_program); rs->program=rpc_program; rs->version=rpc_version; @@ -298,7 +298,7 @@ gtk_rpcstat_init(const char *opt_arg, void* userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(rs->win, close_bt, window_cancel_button_cb); g_signal_connect(rs->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); @@ -355,9 +355,9 @@ rpcstat_program_select(GtkWidget *prog_combo_box, gpointer user_data) GtkWidget *vers_combo_box; int i; - vers_combo_box = user_data; + vers_combo_box = (GtkWidget *)user_data; - if (! ws_combo_box_get_active_pointer(GTK_COMBO_BOX(prog_combo_box), (gpointer)&k)) { + if (! ws_combo_box_get_active_pointer(GTK_COMBO_BOX(prog_combo_box), (gpointer *)&k)) { g_assert_not_reached(); /* Programming error: somehow no active item */ } rpc_program=k->prog; @@ -386,7 +386,7 @@ rpcstat_list_programs(gpointer *key, gpointer *value, gpointer user_data) { rpc_prog_info_key *k=(rpc_prog_info_key *)key; rpc_prog_info_value *v=(rpc_prog_info_value *)value; - GtkComboBox *prog_combo_box = user_data; + GtkComboBox *prog_combo_box = (GtkComboBox *)user_data; ws_combo_box_append_text_and_pointer(prog_combo_box, v->progname, k); @@ -502,11 +502,11 @@ gtk_rpcstat_cb(GtkAction *action _U_, gpointer user_data _U_) gtk_box_pack_start(GTK_BOX(dlg_box), bbox, FALSE, FALSE, 0); gtk_widget_show(bbox); - start_button = g_object_get_data(G_OBJECT(bbox), WIRESHARK_STOCK_CREATE_STAT); + start_button = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), WIRESHARK_STOCK_CREATE_STAT); g_signal_connect_swapped(start_button, "clicked", G_CALLBACK(rpcstat_start_button_clicked), NULL); - cancel_button = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CANCEL); + cancel_button = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CANCEL); window_set_cancel_button(dlg, cancel_button, window_cancel_button_cb); /* Give the initial focus to the "Filter" entry box. */ diff --git a/ui/gtk/rtp_analysis.c b/ui/gtk/rtp_analysis.c index 65e9bb5a1a..bb7f186e4e 100644 --- a/ui/gtk/rtp_analysis.c +++ b/ui/gtk/rtp_analysis.c @@ -309,7 +309,7 @@ static void dialog_graph_reset(user_data_t* user_data); static void rtp_reset(void *user_data_arg) { - user_data_t *user_data = user_data_arg; + user_data_t *user_data = (user_data_t *)user_data_arg; user_data->forward.statinfo.first_packet = TRUE; user_data->reversed.statinfo.first_packet = TRUE; @@ -485,8 +485,8 @@ static int rtp_packet_save_payload(tap_rtp_save_info_t *saveinfo, static int rtp_packet(void *user_data_arg, packet_info *pinfo, epan_dissect_t *edt _U_, const void *rtpinfo_arg) { - user_data_t *user_data = user_data_arg; - const struct _rtp_info *rtpinfo = rtpinfo_arg; + user_data_t *user_data = (user_data_t *)user_data_arg; + const struct _rtp_info *rtpinfo = (struct _rtp_info *)rtpinfo_arg; gboolean rtp_selected = FALSE; /* we ignore packets that are not displayed */ @@ -1495,8 +1495,8 @@ dialog_graph_redraw(user_data_t* user_data) static void quit(GtkWidget *widget _U_, user_data_t *user_data) { - GtkWidget *bt_save = g_object_get_data(G_OBJECT(user_data->dlg.dialog_graph.window), "bt_save"); - surface_info_t *surface_info = g_object_get_data(G_OBJECT(bt_save), "surface-info"); + GtkWidget *bt_save = (GtkWidget *)g_object_get_data(G_OBJECT(user_data->dlg.dialog_graph.window), "bt_save"); + surface_info_t *surface_info = (surface_info_t *)g_object_get_data(G_OBJECT(bt_save), "surface-info"); g_free(surface_info); user_data->dlg.dialog_graph.window = NULL; @@ -1522,7 +1522,7 @@ draw_area_draw(GtkWidget *widget, cairo_t *cr, gpointer data) static gint expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data) { - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; cairo_t *cr = gdk_cairo_create (gtk_widget_get_window(widget)); @@ -1544,7 +1544,7 @@ expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer data) static gint configure_event(GtkWidget *widget, GdkEventConfigure *event _U_, gpointer data) { - user_data_t *user_data = data; + user_data_t *user_data = (user_data_t *)data; GtkWidget *bt_save; GtkAllocation widget_alloc; cairo_t *cr; @@ -1581,7 +1581,7 @@ configure_event(GtkWidget *widget, GdkEventConfigure *event _U_, gpointer data) user_data->dlg.dialog_graph.surface_width = widget_alloc.width; user_data->dlg.dialog_graph.surface_height = widget_alloc.height; - bt_save = g_object_get_data(G_OBJECT(user_data->dlg.dialog_graph.window), "bt_save"); + bt_save = (GtkWidget *)g_object_get_data(G_OBJECT(user_data->dlg.dialog_graph.window), "bt_save"); #if GTK_CHECK_VERSION(2,22,0) surface_info->surface = user_data->dlg.dialog_graph.surface; surface_info->width = widget_alloc.width; @@ -1969,10 +1969,10 @@ dialog_graph_init_window(user_data_t* user_data) gtk_box_pack_start(GTK_BOX(vbox), hbox, FALSE, FALSE, 0); gtk_widget_show(hbox); - bt_close = g_object_get_data(G_OBJECT(hbox), GTK_STOCK_CLOSE); + bt_close = (GtkWidget *)g_object_get_data(G_OBJECT(hbox), GTK_STOCK_CLOSE); window_set_cancel_button(user_data->dlg.dialog_graph.window, bt_close, window_cancel_button_cb); - bt_save = g_object_get_data(G_OBJECT(hbox), GTK_STOCK_SAVE); + bt_save = (GtkWidget *)g_object_get_data(G_OBJECT(hbox), GTK_STOCK_SAVE); gtk_widget_set_sensitive(bt_save, FALSE); gtk_widget_set_tooltip_text(bt_save, "Save the displayed graph to a file"); g_signal_connect(bt_save, "clicked", G_CALLBACK(pixmap_save_cb), NULL); @@ -2141,8 +2141,8 @@ save_csv_as_ok_cb(GtkWidget *w _U_, gpointer fc /*user_data_t *user_data*/) /* It's a directory - set the file selection box to display it. */ set_last_open_dir(g_dest); g_free(g_dest); - file_selection_set_current_folder(fc, get_last_open_dir()); - gtk_file_chooser_set_current_name(fc, ""); + file_selection_set_current_folder((GtkWidget *)fc, get_last_open_dir()); + gtk_file_chooser_set_current_name((GtkFileChooser *)fc, ""); return FALSE; /* run the dialog again */ } @@ -2767,8 +2767,8 @@ save_voice_as_ok_cb(GtkWidget *w _U_, gpointer fc) /* It's a directory - set the file selection box to display it. */ set_last_open_dir(g_dest); g_free(g_dest); - file_selection_set_current_folder(fc, get_last_open_dir()); - gtk_file_chooser_set_current_name(fc, ""); + file_selection_set_current_folder((GtkWidget *)fc, get_last_open_dir()); + gtk_file_chooser_set_current_name((GtkFileChooser *)fc, ""); return FALSE; /* run the dialog again */ } @@ -3738,7 +3738,7 @@ process_node(proto_node *ptree_node, header_field_info *hfinformation, finfo = PNODE_FINFO(ptree_node); if (hfssrc == finfo->hfinfo) { if (hfinformation->type == FT_IPv4) { - ipv4 = fvalue_get(&finfo->value); + ipv4 = (ipv4_addr *)fvalue_get(&finfo->value); *p_result = ipv4_get_net_order_addr(ipv4); } else { @@ -3818,7 +3818,7 @@ rtp_analysis(address *src_fwd, char *tempname; /* init */ - user_data = g_malloc(sizeof(user_data_t)); + user_data = (user_data_t *)g_malloc(sizeof(user_data_t)); COPY_ADDRESS(&(user_data->src_fwd), src_fwd); user_data->port_src_fwd = port_src_fwd; diff --git a/ui/gtk/rtp_stream_dlg.c b/ui/gtk/rtp_stream_dlg.c index 4d28fd7334..fda197bdd4 100644 --- a/ui/gtk/rtp_stream_dlg.c +++ b/ui/gtk/rtp_stream_dlg.c @@ -121,8 +121,8 @@ static gboolean save_stream_ok_cb(GtkWidget *ok_bt _U_, gpointer fs) /* It's a directory - set the file selection box to display it. */ set_last_open_dir(g_dest); g_free(g_dest); - file_selection_set_current_folder(fs, get_last_open_dir()); - gtk_file_chooser_set_current_name(fs, ""); + file_selection_set_current_folder((GtkWidget *)fs, get_last_open_dir()); + gtk_file_chooser_set_current_name((GtkFileChooser *)fs, ""); return FALSE; } @@ -188,8 +188,8 @@ rtpstream_on_unselect(GtkButton *button _U_, gpointer user_data _U_) /****************************************************************************/ static gint rtp_stream_info_cmp_reverse(gconstpointer aa, gconstpointer bb) { - const struct _rtp_stream_info* a = aa; - const struct _rtp_stream_info* b = bb; + const struct _rtp_stream_info* a = (struct _rtp_stream_info *)aa; + const struct _rtp_stream_info* b = (struct _rtp_stream_info *)bb; if (a==NULL || b==NULL) return 1; diff --git a/ui/gtk/sctp_assoc_analyse.c b/ui/gtk/sctp_assoc_analyse.c index 0f71a60f3d..4bf749808d 100644 --- a/ui/gtk/sctp_assoc_analyse.c +++ b/ui/gtk/sctp_assoc_analyse.c @@ -606,7 +606,7 @@ create_analyse_window(struct sctp_analyse *u_data) GtkWidget *hbox_l1, *hbox_l2, *label, *h_button_box; GtkWidget *chunk_stat_bt, *close_bt, *graph_bt1, *graph_bt2, *chunk_bt1, *bt_filter; - u_data->analyse_nb = g_malloc(sizeof(struct notes)); + u_data->analyse_nb = (struct notes *)g_malloc(sizeof(struct notes)); window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_window_set_position (GTK_WINDOW(window), GTK_WIN_POS_CENTER); g_signal_connect(window, "destroy", G_CALLBACK(on_destroy), u_data); @@ -696,7 +696,7 @@ create_analyse_window(struct sctp_analyse *u_data) page2 = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 8, FALSE); gtk_container_set_border_width(GTK_CONTAINER(page2), 8); - u_data->analyse_nb->page2 = g_malloc(sizeof(struct page)); + u_data->analyse_nb->page2 = (struct page *)g_malloc(sizeof(struct page)); u_data->analyse_nb->page2->addr_frame = gtk_frame_new(NULL); gtk_box_pack_start(GTK_BOX(page2), u_data->analyse_nb->page2->addr_frame, TRUE, TRUE, 0); @@ -804,7 +804,7 @@ create_analyse_window(struct sctp_analyse *u_data) page3 = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 8, FALSE); gtk_container_set_border_width(GTK_CONTAINER(page3), 8); - u_data->analyse_nb->page3 = g_malloc(sizeof(struct page)); + u_data->analyse_nb->page3 = (struct page *)g_malloc(sizeof(struct page)); u_data->analyse_nb->page3->addr_frame = gtk_frame_new(NULL); gtk_box_pack_start(GTK_BOX(page3), u_data->analyse_nb->page3->addr_frame, TRUE, TRUE, 0); @@ -922,7 +922,7 @@ assoc_analyse(sctp_assoc_info_t* assoc) struct sctp_analyse *u_data; int i; - u_data = g_malloc(sizeof(struct sctp_analyse)); + u_data = (struct sctp_analyse *)g_malloc(sizeof(struct sctp_analyse)); u_data->assoc = assoc; u_data->assoc->addr_chunk_count = assoc->addr_chunk_count; u_data->window = NULL; @@ -1044,7 +1044,7 @@ struct sctp_analyse *u_data; /* (redissect all packets) */ sctp_stat_scan(); - u_data = g_malloc(sizeof(struct sctp_analyse)); + u_data = (struct sctp_analyse *)g_malloc(sizeof(struct sctp_analyse)); u_data->assoc = NULL; u_data->children = NULL; u_data->analyse_nb = NULL; @@ -1067,7 +1067,7 @@ sctp_analyse_start(GtkAction *action _U_, gpointer user_data _U_) sctp_stat_scan(); - u_data = g_malloc(sizeof(struct sctp_analyse)); + u_data = (struct sctp_analyse *)g_malloc(sizeof(struct sctp_analyse)); u_data->assoc = NULL; u_data->children = NULL; u_data->analyse_nb = NULL; diff --git a/ui/gtk/sctp_chunk_stat.c b/ui/gtk/sctp_chunk_stat.c index dac4874f4e..6ba6535b93 100644 --- a/ui/gtk/sctp_chunk_stat.c +++ b/ui/gtk/sctp_chunk_stat.c @@ -115,7 +115,7 @@ static sctp_ep_t* alloc_sctp_ep(struct _sctp_info *si) if(!si) return NULL; - if (!(ep = g_malloc(sizeof(sctp_ep_t)))) + if (!(ep = (sctp_ep_t *)g_malloc(sizeof(sctp_ep_t)))) return NULL; COPY_ADDRESS(&ep->src,&si->ip_src); @@ -266,7 +266,7 @@ sctpstat_init(const char *opt_arg, void *userdata _U_) GtkWidget *bbox; GtkWidget *close_bt; - hs=g_malloc(sizeof(sctpstat_t)); + hs=(sctpstat_t *)g_malloc(sizeof(sctpstat_t)); if(strncmp(opt_arg,"sctp,stat,",10) == 0){ hs->filter=g_strdup(opt_arg+10); } else { @@ -306,7 +306,7 @@ sctpstat_init(const char *opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_end(GTK_BOX(hs->vbox), bbox, FALSE, FALSE, 0); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(hs->win, close_bt, window_cancel_button_cb); g_signal_connect(hs->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/sctp_chunk_stat_dlg.c b/ui/gtk/sctp_chunk_stat_dlg.c index b9bdd66610..4a7e1bdd30 100644 --- a/ui/gtk/sctp_chunk_stat_dlg.c +++ b/ui/gtk/sctp_chunk_stat_dlg.c @@ -602,7 +602,7 @@ gtk_sctpstat_dlg(struct sctp_udata *u_data, unsigned int direction) GtkWidget *bt_close; - sctp_graph_t *io = g_malloc(sizeof(sctp_graph_t)); + sctp_graph_t *io = (sctp_graph_t *)g_malloc(sizeof(sctp_graph_t)); io->window = NULL; u_data->io = io; u_data->io->window = gtk_window_new (GTK_WINDOW_TOPLEVEL); @@ -672,7 +672,7 @@ sctp_chunk_dlg(struct sctp_udata *u_data) gchar label_txt[50]; int i, row; - sctp_graph_t *io = g_malloc(sizeof(sctp_graph_t)); + sctp_graph_t *io = (sctp_graph_t *)g_malloc(sizeof(sctp_graph_t)); io->window = NULL; u_data->io = io; @@ -777,14 +777,14 @@ sctp_chunk_dlg_show(struct sctp_analyse* userdata) gint i; struct sctp_udata *u_data; - u_data = g_malloc(sizeof(struct sctp_udata)); - u_data->assoc = g_malloc(sizeof(sctp_assoc_info_t)); + u_data = (struct sctp_udata *)g_malloc(sizeof(struct sctp_udata)); + u_data->assoc = (sctp_assoc_info_t *)g_malloc(sizeof(sctp_assoc_info_t)); u_data->assoc = userdata->assoc; u_data->io = NULL; u_data->parent = userdata; if (selected_stream == NULL) - selected_stream = g_malloc(sizeof(sctp_assoc_info_t)); + selected_stream = (sctp_assoc_info_t *)g_malloc(sizeof(sctp_assoc_info_t)); selected_stream = u_data->assoc; for (i=0; iassoc = g_malloc(sizeof(sctp_assoc_info_t)); + u_data = (struct sctp_udata *)g_malloc(sizeof(struct sctp_udata)); + u_data->assoc = (sctp_assoc_info_t *)g_malloc(sizeof(sctp_assoc_info_t)); u_data->assoc = userdata->assoc; u_data->io = NULL; u_data->parent = userdata; if (selected_stream == NULL) - selected_stream = g_malloc(sizeof(sctp_assoc_info_t)); + selected_stream = (sctp_assoc_info_t *)g_malloc(sizeof(sctp_assoc_info_t)); selected_stream = u_data->assoc; selected_stream->addr_chunk_count = u_data->assoc->addr_chunk_count; diff --git a/ui/gtk/sctp_stat_dlg.c b/ui/gtk/sctp_stat_dlg.c index 8203b86319..9ed9cf3165 100644 --- a/ui/gtk/sctp_stat_dlg.c +++ b/ui/gtk/sctp_stat_dlg.c @@ -657,7 +657,7 @@ void sctp_stat_start(GtkAction *action _U_, gpointer user_data _U_) { prevent_update = FALSE; filter_applied = FALSE; - sctp_assocs = g_malloc(sizeof(sctp_allassocs_info_t)); + sctp_assocs = (sctp_allassocs_info_t *)g_malloc(sizeof(sctp_allassocs_info_t)); sctp_assocs = (sctp_allassocs_info_t*)sctp_stat_get_info(); /* Register the tap listener */ if (sctp_stat_get_info()->is_registered == FALSE) diff --git a/ui/gtk/sip_stat.c b/ui/gtk/sip_stat.c index 8b829b2fda..d67f49c672 100644 --- a/ui/gtk/sip_stat.c +++ b/ui/gtk/sip_stat.c @@ -198,7 +198,7 @@ sip_init_hash(sipstat_t *sp) /* Add all response codes */ for (i=0; vals_status_code[i].strptr; i++) { - sip_response_code_t *sc = g_malloc(sizeof(sip_response_code_t)); + sip_response_code_t *sc = (sip_response_code_t *)g_malloc(sizeof(sip_response_code_t)); sc->packets = 0; sc->response_code = vals_status_code[i].value; @@ -342,7 +342,7 @@ sip_reset_hash_requests(gchar *key _U_ , sip_request_method_t *data, gpointer pt static void sipstat_reset(void *psp) { - sipstat_t *sp = psp; + sipstat_t *sp = (sipstat_t *)psp; if (sp) { sp->packets = 0; @@ -361,7 +361,7 @@ sipstat_reset(void *psp) static int sipstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri) { - const sip_info_value_t *value = pri; + const sip_info_value_t *value = (sip_info_value_t *)pri; sipstat_t *sp = (sipstat_t *)psp; /* Total number of packets, including continuation packets */ @@ -407,7 +407,7 @@ sipstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const sip_response_code_t *sc; /* Look up response code in hash table */ - sc = g_hash_table_lookup(sp->hash_responses, GUINT_TO_POINTER(value->response_code)); + sc = (sip_response_code_t *)g_hash_table_lookup(sp->hash_responses, GUINT_TO_POINTER(value->response_code)); if (sc == NULL) { /* Non-standard status code; we classify it as others @@ -449,7 +449,7 @@ sipstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const } /* Now look up this fallback code to get its text description */ - sc = g_hash_table_lookup(sp->hash_responses, GUINT_TO_POINTER(key)); + sc = (sip_response_code_t *)g_hash_table_lookup(sp->hash_responses, GUINT_TO_POINTER(key)); if (sc == NULL) { return 0; @@ -463,11 +463,11 @@ sipstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const sip_request_method_t *sc; /* Look up the request method in the table */ - sc = g_hash_table_lookup(sp->hash_requests, value->request_method); + sc = (sip_request_method_t *)g_hash_table_lookup(sp->hash_requests, value->request_method); if (sc == NULL) { /* First of this type. Create structure and initialise */ - sc = g_malloc(sizeof(sip_request_method_t)); + sc = (sip_request_method_t *)g_malloc(sizeof(sip_request_method_t)); sc->response = g_strdup(value->request_method); sc->packets = 1; sc->widget = NULL; @@ -496,7 +496,7 @@ static void sipstat_draw(void *psp) { gchar string_buff[SUM_STR_MAX]; - sipstat_t *sp = psp; + sipstat_t *sp = (sipstat_t *)psp; /* Set summary label */ g_snprintf(string_buff, sizeof(string_buff), @@ -576,7 +576,7 @@ gtk_sipstat_init(const char *opt_arg, void *userdata _U_) } /* Create sip stats window structure */ - sp = g_malloc(sizeof(sipstat_t)); + sp = (sipstat_t *)g_malloc(sizeof(sipstat_t)); sp->win = dlg_window_new("sip-stat"); /* transient_for top_level */ gtk_window_set_destroy_with_parent(GTK_WINDOW(sp->win), TRUE); @@ -660,7 +660,7 @@ gtk_sipstat_init(const char *opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_start(GTK_BOX(main_vb), bbox, FALSE, FALSE, 0); - bt_close = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + bt_close = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(sp->win, bt_close, window_cancel_button_cb); g_signal_connect(sp->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/smb2_stat.c b/ui/gtk/smb2_stat.c index 12cb854fb2..9d1e6cfa7f 100644 --- a/ui/gtk/smb2_stat.c +++ b/ui/gtk/smb2_stat.c @@ -74,7 +74,7 @@ static int smb2stat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const void *psi) { smb2stat_t *ss=(smb2stat_t *)pss; - const smb2_info_t *si=psi; + const smb2_info_t *si=(smb2_info_t *)psi; /* we are only interested in response packets */ if(!(si->flags&SMB2_FLAGS_RESPONSE)){ @@ -132,7 +132,7 @@ gtk_smb2stat_init(const char *opt_arg, void *userdata _U_) filter=NULL; } - ss=g_malloc(sizeof(smb2stat_t)); + ss=(smb2stat_t *)g_malloc(sizeof(smb2stat_t)); ss->win = dlg_window_new("smb2-stat"); /* transient_for top_level */ gtk_window_set_destroy_with_parent (GTK_WINDOW(ss->win), TRUE); @@ -176,7 +176,7 @@ gtk_smb2stat_init(const char *opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(ss->win, close_bt, window_cancel_button_cb); g_signal_connect(ss->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/smb_stat.c b/ui/gtk/smb_stat.c index c7d20bc128..dc0a85969f 100644 --- a/ui/gtk/smb_stat.c +++ b/ui/gtk/smb_stat.c @@ -78,7 +78,7 @@ static int smbstat_packet(void *pss, packet_info *pinfo, epan_dissect_t *edt _U_, const void *psi) { smbstat_t *ss=(smbstat_t *)pss; - const smb_info_t *si=psi; + const smb_info_t *si=(smb_info_t *)psi; /* we are only interested in reply packets */ if(si->request){ @@ -154,7 +154,7 @@ gtk_smbstat_init(const char *opt_arg, void *userdata _U_) filter=NULL; } - ss=g_malloc(sizeof(smbstat_t)); + ss=(smbstat_t *)g_malloc(sizeof(smbstat_t)); ss->win = dlg_window_new("smb-stat"); /* transient_for top_level */ gtk_window_set_destroy_with_parent (GTK_WINDOW(ss->win), TRUE); @@ -214,7 +214,7 @@ gtk_smbstat_init(const char *opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_end(GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(ss->win, close_bt, window_cancel_button_cb); g_signal_connect(ss->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/stats_tree_stat.c b/ui/gtk/stats_tree_stat.c index 3c671db6a2..8db0f1c502 100644 --- a/ui/gtk/stats_tree_stat.c +++ b/ui/gtk/stats_tree_stat.c @@ -77,10 +77,10 @@ setup_gtk_node_pr(stat_node* node) { GtkTreeIter* parent = NULL; - node->pr = g_malloc(sizeof(st_node_pres)); + node->pr = (st_node_pres *)g_malloc(sizeof(st_node_pres)); if (node->st->pr->store) { - node->pr->iter = g_malloc0(sizeof(GtkTreeIter)); + node->pr->iter = (GtkTreeIter *)g_malloc0(sizeof(GtkTreeIter)); if ( node->parent && node->parent->pr ) { parent = node->parent->pr->iter; @@ -120,7 +120,7 @@ draw_gtk_node(stat_node* node) static void draw_gtk_tree(void *psp) { - stats_tree *st = psp; + stats_tree *st = (stats_tree *)psp; stat_node* child; for (child = st->root.children; child; child = child->next ) { @@ -166,7 +166,7 @@ clear_node_pr(stat_node* n) static void reset_tap(void* p) { - stats_tree* st = p; + stats_tree* st = (stats_tree *)p; stat_node* c; for (c = st->root.children; c; c = c->next) { clear_node_pr(c); @@ -182,7 +182,7 @@ init_gtk_tree(const char* opt_arg, void *userdata _U_) gchar *abbr = stats_tree_get_abbr(opt_arg); stats_tree* st = NULL; stats_tree_cfg* cfg = NULL; - tree_pres* pr = g_malloc(sizeof(tree_pres)); + tree_pres* pr = (tree_pres *)g_malloc(sizeof(tree_pres)); gchar* title = NULL; gchar* window_name = NULL; GString* error_string; @@ -314,7 +314,7 @@ init_gtk_tree(const char* opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_start(GTK_BOX(main_vb), bbox, FALSE, FALSE, 0); - bt_close = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + bt_close = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(st->pr->win, bt_close, window_cancel_button_cb); g_signal_connect(GTK_WINDOW(st->pr->win), "delete_event", G_CALLBACK(window_delete_event_cb), NULL); @@ -334,11 +334,11 @@ static tap_param tree_stat_params[] = { static void register_gtk_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_pres)); + cfg->pr = (tree_cfg_pres *)g_malloc(sizeof(tree_cfg_pres)); - cfg->pr->stat_dlg = g_malloc(sizeof(tap_param_dlg)); + cfg->pr->stat_dlg = (tap_param_dlg *)g_malloc(sizeof(tap_param_dlg)); cfg->pr->stat_dlg->win_title = g_strdup_printf("%s Stats Tree",cfg->name); cfg->pr->stat_dlg->init_string = g_strdup_printf("%s,tree",cfg->abbr); diff --git a/ui/gtk/tcp_graph.c b/ui/gtk/tcp_graph.c index 13616d160e..693b2d6f8b 100644 --- a/ui/gtk/tcp_graph.c +++ b/ui/gtk/tcp_graph.c @@ -3230,7 +3230,7 @@ draw_event(GtkWidget *widget _U_, cairo_t *cr, gpointer user_data) #else static gboolean expose_event(GtkWidget *widget, GdkEventExpose *event, gpointer user_data) { - struct graph *g = user_data; + struct graph *g = (struct graph *)user_data; cairo_t *cr; debug(DBS_FENTRY) puts("expose_event()"); @@ -3632,7 +3632,7 @@ static gboolean motion_notify_event(GtkWidget *widget _U_, GdkEventMotion *event else { x = (int) event->x; y = (int) event->y; - state = event->state; + state = (GdkModifierType)event->state; } /* Testing just (state & GDK_BUTTON1_MASK) is not enough since when button1 diff --git a/ui/gtk/voip_calls.c b/ui/gtk/voip_calls.c index c966df886b..073aeae775 100644 --- a/ui/gtk/voip_calls.c +++ b/ui/gtk/voip_calls.c @@ -1154,9 +1154,9 @@ isup_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co while (list) { right_pair = TRUE; - tmp_listinfo=list->data; + tmp_listinfo=(voip_calls_info_t *)list->data; if ((tmp_listinfo->protocol == VOIP_ISUP)&&(tmp_listinfo->call_active_state==VOIP_ACTIVE)) { - tmp_isupinfo = tmp_listinfo->prot_info; + tmp_isupinfo = (isup_calls_info_t *)tmp_listinfo->prot_info; if ((tmp_isupinfo->cic == pinfo->circuit_id)&&(tmp_isupinfo->ni == mtp3_ni)) { if ((tmp_isupinfo->opc == mtp3_opc)&&(tmp_isupinfo->dpc == mtp3_dpc)) { forward = TRUE; @@ -1192,7 +1192,7 @@ isup_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co if ((callsinfo==NULL) &&(pi->message_type==1)) { - callsinfo = g_malloc0(sizeof(voip_calls_info_t)); + callsinfo = (voip_calls_info_t *)g_malloc0(sizeof(voip_calls_info_t)); callsinfo->call_active_state = VOIP_ACTIVE; callsinfo->call_state = VOIP_UNKNOWN; COPY_ADDRESS(&(callsinfo->initial_speaker),&(pinfo->src)); @@ -1207,7 +1207,7 @@ isup_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co } callsinfo->prot_info=g_malloc(sizeof(isup_calls_info_t)); callsinfo->free_prot_info = g_free; - tmp_isupinfo=callsinfo->prot_info; + tmp_isupinfo=(isup_calls_info_t *)callsinfo->prot_info; tmp_isupinfo->opc = mtp3_opc; tmp_isupinfo->dpc = mtp3_dpc; tmp_isupinfo->ni = mtp3_ni; @@ -1338,7 +1338,7 @@ remove_tap_listener_isup_calls(void) static int mtp3_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void *mtp3_info _U_) { - const mtp3_tap_rec_t *pi = mtp3_info; + const mtp3_tap_rec_t *pi = (mtp3_tap_rec_t *)mtp3_info; /* keep the data in memory to use when the ISUP information arrives */ @@ -1450,7 +1450,7 @@ q931_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co h245_address_t *h245_add = NULL; gchar *comment; - const q931_packet_info *pi = q931_info; + const q931_packet_info *pi = (const q931_packet_info *)q931_info; /* free previously allocated q931_calling/ed_number */ g_free(q931_calling_number); @@ -1476,9 +1476,9 @@ q931_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co list = g_list_first(tapinfo->callsinfo_list); while (list) { - tmp_listinfo=list->data; + tmp_listinfo=(voip_calls_info_t *)list->data; if ( (tmp_listinfo->protocol == VOIP_H323) && (tmp_listinfo->call_num == h225_call_num) ) { - tmp_h323info = tmp_listinfo->prot_info; + tmp_h323info = (h323_calls_info_t *)tmp_listinfo->prot_info; callsinfo = (voip_calls_info_t*)(list->data); /* Add the CRV to the h323 call */ @@ -1512,9 +1512,9 @@ q931_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co list = g_list_first(tapinfo->callsinfo_list); while (list) { - tmp_listinfo=list->data; + tmp_listinfo=(voip_calls_info_t *)list->data; if (tmp_listinfo->protocol == VOIP_H323) { - tmp2_h323info = tmp_listinfo->prot_info; + tmp2_h323info = (h323_calls_info_t *)tmp_listinfo->prot_info; /* check if the called number match a LRQ/LCF */ if ( (strcmp(callsinfo->to_identity, tmp_listinfo->to_identity)==0) @@ -1530,7 +1530,7 @@ q931_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co list2 = g_list_first(tmp2_h323info->h245_list); while (list2) { - h245_add=list2->data; + h245_add=(h245_address_t *)list2->data; g_free((void *)h245_add->h245_address.data); g_free(list2->data); list2 = g_list_next(list2); @@ -1573,9 +1573,9 @@ q931_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co list = g_list_first(tapinfo->callsinfo_list); while (list) { - tmp_listinfo=list->data; + tmp_listinfo=(voip_calls_info_t *)list->data; if (tmp_listinfo->protocol == VOIP_H323) { - tmp_h323info = tmp_listinfo->prot_info; + tmp_h323info = (h323_calls_info_t *)tmp_listinfo->prot_info; if ( ((tmp_h323info->q931_crv == q931_crv) || (tmp_h323info->q931_crv2 == q931_crv)) && (q931_crv!=-1)) { /* if the frame number exists in graph, append to it*/ if (!append_to_frame_graph(tapinfo, q931_frame_num, NULL, NULL)) { @@ -1603,9 +1603,9 @@ q931_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co list = g_list_first(tapinfo->callsinfo_list); while (list) { - tmp_listinfo=list->data; + tmp_listinfo=(voip_calls_info_t *)list->data; if ( tmp_listinfo->protocol == VOIP_AC_ISDN ) { - tmp_actrace_isdn_info = tmp_listinfo->prot_info; + tmp_actrace_isdn_info = (actrace_isdn_calls_info_t *)tmp_listinfo->prot_info; /* TODO: Also check the IP of the Blade, and if the call is complete (no active) */ if ( (tmp_actrace_isdn_info->crv == q931_crv) && (tmp_actrace_isdn_info->trunk == actrace_trunk) ) { callsinfo = (voip_calls_info_t*)(list->data); @@ -1619,7 +1619,7 @@ q931_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co /* if it is a new call, add it to the list */ if (!callsinfo) { - callsinfo = g_malloc0(sizeof(voip_calls_info_t)); + callsinfo = (voip_calls_info_t *)g_malloc0(sizeof(voip_calls_info_t)); callsinfo->call_active_state = VOIP_ACTIVE; callsinfo->call_state = VOIP_CALL_SETUP; callsinfo->from_identity=g_strdup(q931_calling_number); @@ -1630,7 +1630,7 @@ q931_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co callsinfo->protocol=VOIP_AC_ISDN; callsinfo->prot_info=g_malloc(sizeof(actrace_isdn_calls_info_t)); callsinfo->free_prot_info = g_free; - tmp_actrace_isdn_info=callsinfo->prot_info; + tmp_actrace_isdn_info=(actrace_isdn_calls_info_t *)callsinfo->prot_info; tmp_actrace_isdn_info->crv=q931_crv; tmp_actrace_isdn_info->trunk=actrace_trunk; callsinfo->npackets = 0; @@ -1742,7 +1742,7 @@ static void add_h245_Address(h323_calls_info_t *h323info, h245_address_t *h245_ static void free_h225_info(gpointer p) { - h323_calls_info_t *tmp_h323info = p; + h323_calls_info_t *tmp_h323info = (h323_calls_info_t *)p; g_free(tmp_h323info->guid); @@ -1750,7 +1750,7 @@ static void free_h225_info(gpointer p) { GList *list2 = g_list_first(tmp_h323info->h245_list); while (list2) { - h245_address_t *h245_add=list2->data; + h245_address_t *h245_add=(h245_address_t *)list2->data; g_free((void *)h245_add->h245_address.data); g_free(list2->data); list2 = g_list_next(list2); @@ -1776,7 +1776,7 @@ H225calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con GList *list; h245_address_t *h245_add = NULL; - const h225_packet_info *pi = H225info; + const h225_packet_info *pi = (const h225_packet_info *)H225info; /* if not guid and RAS and not LRQ, LCF or LRJ return because did not belong to a call */ /* OR, if not guid and is H225 return because doesn't belong to a call */ @@ -1793,10 +1793,10 @@ H225calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con list = g_list_first(tapinfo->callsinfo_list); while (list) { - tmp_listinfo=list->data; + tmp_listinfo=(voip_calls_info_t *)list->data; g_assert(tmp_listinfo != NULL); if (tmp_listinfo->protocol == VOIP_H323) { - tmp_h323info = tmp_listinfo->prot_info; + tmp_h323info = (h323_calls_info_t *)tmp_listinfo->prot_info; if (tmp_h323info->requestSeqNum == pi->requestSeqNum) { callsinfo = (voip_calls_info_t*)(list->data); break; @@ -1809,9 +1809,9 @@ H225calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con list = g_list_first(tapinfo->callsinfo_list); while (list) { - tmp_listinfo=list->data; + tmp_listinfo=(voip_calls_info_t *)list->data; if (tmp_listinfo->protocol == VOIP_H323) { - tmp_h323info = tmp_listinfo->prot_info; + tmp_h323info = (h323_calls_info_t *)tmp_listinfo->prot_info; g_assert(tmp_h323info != NULL); if ( (memcmp(tmp_h323info->guid, &guid_allzero, GUID_LEN) != 0) && (memcmp(tmp_h323info->guid, &pi->guid,GUID_LEN)==0) ) { callsinfo = (voip_calls_info_t*)(list->data); @@ -1827,7 +1827,7 @@ H225calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con /* not in the list? then create a new entry */ if (callsinfo==NULL) { - callsinfo = g_malloc0(sizeof(voip_calls_info_t)); + callsinfo = (voip_calls_info_t *)g_malloc0(sizeof(voip_calls_info_t)); callsinfo->call_active_state = VOIP_ACTIVE; callsinfo->call_state = VOIP_UNKNOWN; callsinfo->from_identity=g_strdup(""); @@ -1839,9 +1839,9 @@ H225calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con callsinfo->prot_info=g_malloc(sizeof(h323_calls_info_t)); callsinfo->free_prot_info = free_h225_info; - tmp_h323info = callsinfo->prot_info; + tmp_h323info = (h323_calls_info_t *)callsinfo->prot_info; g_assert(tmp_h323info != NULL); - tmp_h323info->guid = g_memdup(&pi->guid, sizeof pi->guid); + tmp_h323info->guid = (e_guid_t *)g_memdup(&pi->guid, sizeof pi->guid); tmp_h323info->h225SetupAddr.type = AT_NONE; tmp_h323info->h225SetupAddr.len = 0; tmp_h323info->h245_list = NULL; @@ -1877,7 +1877,7 @@ H225calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con /* this is still IPv4 only, because the dissector is */ if (pi->is_h245 == TRUE) { - h245_add = g_malloc(sizeof (h245_address_t)); + h245_add = (h245_address_t *)g_malloc(sizeof (h245_address_t)); h245_add->h245_address.type=AT_IPv4; h245_add->h245_address.len=4; h245_add->h245_address.data = g_malloc(sizeof(pi->h245_address)); @@ -2079,20 +2079,20 @@ H245dgcalls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, c GList *list2; h245_address_t *h245_add = NULL; - const h245_packet_info *pi = H245info; + const h245_packet_info *pi = (h245_packet_info *)H245info; /* check if Tunneling is OFF and we have a call with this H245 add */ list = g_list_first(tapinfo->callsinfo_list); while (list) { - tmp_listinfo=list->data; + tmp_listinfo=(voip_calls_info_t *)list->data; if (tmp_listinfo->protocol == VOIP_H323) { - tmp_h323info = tmp_listinfo->prot_info; + tmp_h323info = (h323_calls_info_t *)tmp_listinfo->prot_info; list2 = g_list_first(tmp_h323info->h245_list); while (list2) { - h245_add=list2->data; + h245_add=(h245_address_t *)list2->data; if ( (ADDRESSES_EQUAL(&(h245_add->h245_address),&(pinfo->src)) && (h245_add->h245_port == pinfo->srcport)) || (ADDRESSES_EQUAL(&(h245_add->h245_address),&(pinfo->dst)) && (h245_add->h245_port == pinfo->destport)) ) { callsinfo = (voip_calls_info_t*)(list->data); @@ -2181,7 +2181,7 @@ static int SDPcalls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void *SDPinfo) { voip_calls_tapinfo_t *tapinfo = &the_tapinfo_struct; - const sdp_packet_info *pi = SDPinfo; + const sdp_packet_info *pi = (sdp_packet_info *)SDPinfo; /* There are protocols like MGCP/SIP where the SDP is called before the tap for the MGCP/SIP packet, in those cases we assign the SPD summary to global lastSDPsummary @@ -2335,7 +2335,7 @@ static void mgcpDialedDigits(gchar *signalStr, gchar **dialedDigits) return; } - resultStr = g_malloc(resultStrLen); + resultStr = (gchar *)g_malloc(resultStrLen); for (i = 0, j = 0; tmpStr[i]; i++) { if (tmpStr[i] != '?') @@ -2368,11 +2368,11 @@ MGCPcalls_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co gchar *frame_label = NULL; gchar *comment = NULL; graph_analysis_item_t *gai; - gboolean new = FALSE; + gboolean newcall = FALSE; gboolean fromEndpoint = FALSE; /* true for calls originated in Endpoints, false for calls from MGC */ gdouble diff_time; - const mgcp_info_t *pi = MGCPinfo; + const mgcp_info_t *pi = (mgcp_info_t *)MGCPinfo; if ((pi->mgcp_type == MGCP_REQUEST) && !pi->is_duplicate ) { @@ -2380,9 +2380,9 @@ MGCPcalls_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co list = g_list_first(tapinfo->callsinfo_list); while (list) { - tmp_listinfo=list->data; + tmp_listinfo=(voip_calls_info_t *)list->data; if ((tmp_listinfo->protocol == VOIP_MGCP) && (tmp_listinfo->call_active_state == VOIP_ACTIVE)) { - tmp_mgcpinfo = tmp_listinfo->prot_info; + tmp_mgcpinfo = (mgcp_calls_info_t *)tmp_listinfo->prot_info; if (pi->endpointId != NULL) { if (g_ascii_strcasecmp(tmp_mgcpinfo->endpointId,pi->endpointId) == 0) { /* @@ -2411,13 +2411,13 @@ MGCPcalls_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co if ( (strcmp(pi->code, "NTFY") == 0) && isSignal("hd", pi->observedEvents) ) { /* off hook transition */ /* this is a new call from the Endpoint */ fromEndpoint = TRUE; - new = TRUE; + newcall = TRUE; } else if (strcmp(pi->code, "CRCX") == 0) { /* this is a new call from the MGC */ fromEndpoint = FALSE; - new = TRUE; + newcall = TRUE; } - if (!new) return 0; + if (!newcall) return 0; } } else if ( ((pi->mgcp_type == MGCP_RESPONSE) && pi->request_available) || ((pi->mgcp_type == MGCP_REQUEST) && pi->is_duplicate) ) { @@ -2426,16 +2426,16 @@ MGCPcalls_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co listGraph = g_list_first(tapinfo->graph_analysis->list); while (listGraph) { - gai = listGraph->data; + gai = (graph_analysis_item_t *)listGraph->data; if (gai->fd->num == pi->req_num) { /* there is a request that match, so look the associated call with this call_num */ list = g_list_first(tapinfo->callsinfo_list); while (list) { - tmp_listinfo=list->data; + tmp_listinfo=(voip_calls_info_t *)list->data; if (tmp_listinfo->protocol == VOIP_MGCP) { if (tmp_listinfo->call_num == gai->conv_num) { - tmp_mgcpinfo = tmp_listinfo->prot_info; + tmp_mgcpinfo = (mgcp_calls_info_t *)tmp_listinfo->prot_info; callsinfo = (voip_calls_info_t*)(list->data); break; } @@ -2452,7 +2452,7 @@ MGCPcalls_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co /* not in the list? then create a new entry */ if (callsinfo==NULL) { - callsinfo = g_malloc0(sizeof(voip_calls_info_t)); + callsinfo = (voip_calls_info_t *)g_malloc0(sizeof(voip_calls_info_t)); callsinfo->call_active_state = VOIP_ACTIVE; callsinfo->call_state = VOIP_CALL_SETUP; if (fromEndpoint) { @@ -2468,7 +2468,7 @@ MGCPcalls_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, co callsinfo->protocol=VOIP_MGCP; callsinfo->prot_info=g_malloc(sizeof(mgcp_calls_info_t)); callsinfo->free_prot_info = g_free; - tmp_mgcpinfo=callsinfo->prot_info; + tmp_mgcpinfo=(mgcp_calls_info_t *)callsinfo->prot_info; tmp_mgcpinfo->endpointId = g_strdup(pi->endpointId); tmp_mgcpinfo->fromEndpoint = fromEndpoint; callsinfo->npackets = 0; @@ -2630,7 +2630,7 @@ static int ACTRACEcalls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void *ACTRACEinfo) { voip_calls_tapinfo_t *tapinfo = &the_tapinfo_struct; - const actrace_info_t *pi = ACTRACEinfo; + const actrace_info_t *pi = (const actrace_info_t *)ACTRACEinfo; GList *list; actrace_cas_calls_info_t *tmp_actrace_cas_info; voip_calls_info_t *tmp_listinfo; @@ -2649,9 +2649,9 @@ ACTRACEcalls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, list = g_list_first(tapinfo->callsinfo_list); while (list) { - tmp_listinfo=list->data; + tmp_listinfo=(voip_calls_info_t *)list->data; if ( tmp_listinfo->protocol == VOIP_AC_CAS ) { - tmp_actrace_cas_info = tmp_listinfo->prot_info; + tmp_actrace_cas_info = (actrace_cas_calls_info_t *)tmp_listinfo->prot_info; /* TODO: Also check the IP of the Blade, and if the call is complete (no active) */ if ( (tmp_actrace_cas_info->bchannel == pi->cas_bchannel) && (tmp_actrace_cas_info->trunk == actrace_trunk) ) { callsinfo = (voip_calls_info_t*)(list->data); @@ -2665,7 +2665,7 @@ ACTRACEcalls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, /* if it is a new call, add it to the list */ if (!callsinfo) { - callsinfo = g_malloc0(sizeof(voip_calls_info_t)); + callsinfo = (voip_calls_info_t *)g_malloc0(sizeof(voip_calls_info_t)); callsinfo->call_active_state = VOIP_ACTIVE; callsinfo->call_state = VOIP_CALL_SETUP; callsinfo->from_identity=g_strdup("N/A"); @@ -2677,7 +2677,7 @@ ACTRACEcalls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, callsinfo->prot_info=g_malloc(sizeof(actrace_cas_calls_info_t)); callsinfo->free_prot_info = g_free; - tmp_actrace_cas_info=callsinfo->prot_info; + tmp_actrace_cas_info=(actrace_cas_calls_info_t *)callsinfo->prot_info; tmp_actrace_cas_info->bchannel=pi->cas_bchannel; tmp_actrace_cas_info->trunk=actrace_trunk; callsinfo->npackets = 0; @@ -2759,7 +2759,7 @@ static gboolean have_megaco_tap_listener = FALSE; static int h248_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, const void *prot_info) { voip_calls_tapinfo_t *tapinfo = &the_tapinfo_struct; - const gcp_cmd_t *cmd = prot_info; + const gcp_cmd_t *cmd = (gcp_cmd_t *)prot_info; GList *list; voip_calls_info_t *callsinfo = NULL; address *mgw; @@ -2784,7 +2784,7 @@ static int h248_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t * list = g_list_first(tapinfo->callsinfo_list); while (list) { - voip_calls_info_t* tmp_listinfo = list->data; + voip_calls_info_t* tmp_listinfo = (voip_calls_info_t *)list->data; if (tmp_listinfo->protocol == TEL_H248) { if (tmp_listinfo->prot_info == cmd->ctx) { @@ -2797,7 +2797,7 @@ static int h248_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t * if (callsinfo==NULL) { - callsinfo = g_malloc0(sizeof(voip_calls_info_t)); + callsinfo = (voip_calls_info_t *)g_malloc0(sizeof(voip_calls_info_t)); callsinfo->call_state = VOIP_NO_STATE; callsinfo->call_active_state = VOIP_ACTIVE; callsinfo->from_identity = g_strdup_printf("%s : %.8x", mgw_addr, cmd->ctx->id); @@ -2925,7 +2925,7 @@ const value_string* sccp_payload_values; static int sccp_calls(packet_info *pinfo, const void *prot_info) { voip_calls_tapinfo_t *tapinfo = &the_tapinfo_struct; - const sccp_msg_info_t* msg = prot_info; + const sccp_msg_info_t* msg = (const sccp_msg_info_t *)prot_info; sccp_assoc_info_t* assoc = msg->data.co.assoc; GList *list; voip_calls_info_t *callsinfo = NULL; @@ -2941,7 +2941,7 @@ static int sccp_calls(packet_info *pinfo, const void *prot_info) { } if (callsinfo==NULL) { - callsinfo = g_malloc0(sizeof(voip_calls_info_t)); + callsinfo = (voip_calls_info_t *)g_malloc0(sizeof(voip_calls_info_t)); callsinfo->call_state = VOIP_CALL_SETUP; callsinfo->call_active_state = VOIP_ACTIVE; if ( assoc->calling_party ) { @@ -3106,7 +3106,7 @@ unistim_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, gchar *comment = NULL; /* Fetch specific packet infos */ - const unistim_info_t *pi = unistim_info; + const unistim_info_t *pi = (const unistim_info_t *)unistim_info; /* Init gstring */ g_tmp = g_string_new(NULL); @@ -3116,11 +3116,11 @@ unistim_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, while(list) { - tmp_listinfo = list->data; + tmp_listinfo = (voip_calls_info_t *)list->data; if(tmp_listinfo->protocol == VOIP_UNISTIM) { - tmp_unistim_info = tmp_listinfo->prot_info; + tmp_unistim_info = (unistim_info_t *)tmp_listinfo->prot_info; /* Search by termid if possible, otherwise use ni/it ip + port.. */ if(pi->termid != 0) { @@ -3168,7 +3168,7 @@ unistim_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, /* If new add to list */ if (callsinfo==NULL) { - callsinfo = g_malloc0(sizeof(voip_calls_info_t)); + callsinfo = (voip_calls_info_t *)g_malloc0(sizeof(voip_calls_info_t)); callsinfo->call_active_state = VOIP_ACTIVE; callsinfo->call_state = VOIP_CALL_SETUP; callsinfo->from_identity=g_strdup_printf("%x",pi->termid); @@ -3184,7 +3184,7 @@ unistim_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, callsinfo->protocol=VOIP_UNISTIM; callsinfo->prot_info=g_malloc(sizeof(unistim_info_t)); - tmp_unistim_info = callsinfo->prot_info; + tmp_unistim_info = (unistim_info_t *)callsinfo->prot_info; /* Clear tap struct */ tmp_unistim_info->rudp_type = 0; @@ -3212,7 +3212,7 @@ unistim_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, } else { /* Set up call wide info struct */ - tmp_unistim_info = callsinfo->prot_info; + tmp_unistim_info = (unistim_info_t *)callsinfo->prot_info; tmp_unistim_info->sequence = pi->sequence; } @@ -3421,7 +3421,7 @@ unistim_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, * ineffective. * Sometimes calls start immediately with open stream. */ - callsinfo = g_malloc0(sizeof(voip_calls_info_t)); + callsinfo = (voip_calls_info_t *)g_malloc0(sizeof(voip_calls_info_t)); callsinfo->call_active_state = VOIP_ACTIVE; callsinfo->call_state = VOIP_CALL_SETUP; callsinfo->from_identity=g_strdup("UNKNOWN"); @@ -3436,7 +3436,7 @@ unistim_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, callsinfo->protocol=VOIP_UNISTIM; callsinfo->prot_info=g_malloc(sizeof(unistim_info_t)); - tmp_unistim_info = callsinfo->prot_info; + tmp_unistim_info = (unistim_info_t *)callsinfo->prot_info; /* Clear tap struct */ tmp_unistim_info->rudp_type = 0; @@ -3620,7 +3620,7 @@ skinny_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, GList* list; voip_calls_info_t *callsinfo = NULL; address* phone; - const skinny_info_t *si = skinny_info; + const skinny_info_t *si = (skinny_info_t *)skinny_info; skinny_calls_info_t *tmp_skinnyinfo; gchar *comment; @@ -3630,9 +3630,9 @@ skinny_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, list = g_list_first(tapinfo->callsinfo_list); while (list) { - voip_calls_info_t* tmp_listinfo = list->data; + voip_calls_info_t* tmp_listinfo = (voip_calls_info_t *)list->data; if (tmp_listinfo->protocol == VOIP_SKINNY) { - tmp_skinnyinfo = tmp_listinfo->prot_info; + tmp_skinnyinfo = (skinny_calls_info_t *)tmp_listinfo->prot_info; if (tmp_skinnyinfo->callId == si->callId || tmp_skinnyinfo->callId == si->passThruId) { callsinfo = (voip_calls_info_t*)(list->data); @@ -3648,7 +3648,7 @@ skinny_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, phone = &(pinfo->src); if (callsinfo==NULL) { - callsinfo = g_malloc0(sizeof(voip_calls_info_t)); + callsinfo = (voip_calls_info_t *)g_malloc0(sizeof(voip_calls_info_t)); callsinfo->call_state = VOIP_NO_STATE; callsinfo->call_active_state = VOIP_ACTIVE; /* callsinfo->from_identity = g_strdup_printf("%s : %.8x", "Skinny", 1); */ @@ -3656,7 +3656,7 @@ skinny_calls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, callsinfo->to_identity = g_strdup(""); callsinfo->prot_info = g_malloc(sizeof(skinny_calls_info_t)); callsinfo->free_prot_info = g_free; - tmp_skinnyinfo = callsinfo->prot_info; + tmp_skinnyinfo = (skinny_calls_info_t *)callsinfo->prot_info; tmp_skinnyinfo->callId = si->callId ? si->callId : si->passThruId; callsinfo->npackets = 1; @@ -3798,7 +3798,7 @@ static const voip_call_state tap_iax_voip_state[] = { }; static void free_iax2_info(gpointer p) { - iax2_info_t *ii = p; + iax2_info_t *ii = (iax2_info_t *)p; g_free(ii); } @@ -3813,7 +3813,7 @@ iax2_calls_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, c GList* list; voip_calls_info_t *callsinfo = NULL; address* phone; - const iax2_info_t *ii = iax2_info; + const iax2_info_t *ii = (iax2_info_t *)iax2_info; iax2_info_t *tmp_iax2info; if (ii == NULL || ii->ptype != IAX2_FULL_PACKET || (ii->scallno == 0 && ii->dcallno == 0)) @@ -3822,9 +3822,9 @@ iax2_calls_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, c list = g_list_first(tapinfo->callsinfo_list); while (list) { - voip_calls_info_t* tmp_listinfo = list->data; + voip_calls_info_t* tmp_listinfo = (voip_calls_info_t *)list->data; if (tmp_listinfo->protocol == VOIP_IAX2) { - tmp_iax2info = tmp_listinfo->prot_info; + tmp_iax2info = (iax2_info_t *)tmp_listinfo->prot_info; if (tmp_iax2info->scallno == ii->scallno || tmp_iax2info->scallno == ii->dcallno) { callsinfo = (voip_calls_info_t*)(list->data); @@ -3840,12 +3840,12 @@ iax2_calls_packet( void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, c /* We only care about real calls, i.e., no registration stuff */ if (ii->ftype != AST_FRAME_IAX || ii->csub != IAX_COMMAND_NEW) return 0; - callsinfo = g_malloc0(sizeof(voip_calls_info_t)); + callsinfo = (voip_calls_info_t *)g_malloc0(sizeof(voip_calls_info_t)); callsinfo->call_state = VOIP_NO_STATE; callsinfo->call_active_state = VOIP_ACTIVE; callsinfo->prot_info=g_malloc(sizeof(iax2_info_t)); callsinfo->free_prot_info = free_iax2_info; - tmp_iax2info = callsinfo->prot_info; + tmp_iax2info = (iax2_info_t *)callsinfo->prot_info; tmp_iax2info->scallno = ii->scallno; if (tmp_iax2info->scallno == 0) tmp_iax2info->scallno = ii->dcallno; @@ -3941,12 +3941,12 @@ VoIPcalls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con voip_calls_info_t *callsinfo = NULL; voip_calls_info_t *tmp_listinfo; GList *list = NULL; - const voip_packet_info_t *pi = VoIPinfo; + const voip_packet_info_t *pi = (voip_packet_info_t *)VoIPinfo; if (pi->call_id) list = g_list_first(tapinfo->callsinfo_list); while (list) { - tmp_listinfo = list->data; + tmp_listinfo = (voip_calls_info_t *)list->data; if ( tmp_listinfo->protocol == VOIP_COMMON ) { if (!strcmp(pi->call_id, tmp_listinfo->call_id)) { callsinfo = (voip_calls_info_t*)(list->data); @@ -3957,7 +3957,7 @@ VoIPcalls_packet(void *ptr _U_, packet_info *pinfo, epan_dissect_t *edt _U_, con } if (callsinfo == NULL) { - callsinfo = g_malloc0(sizeof(voip_calls_info_t)); + callsinfo = (voip_calls_info_t *)g_malloc0(sizeof(voip_calls_info_t)); callsinfo->call_active_state = pi->call_active_state; callsinfo->call_state = pi->call_state; callsinfo->call_id=g_strdup((pi->call_id)?pi->call_id:""); diff --git a/ui/gtk/voip_calls_dlg.c b/ui/gtk/voip_calls_dlg.c index 373c3e9c5e..39e96ed6fe 100644 --- a/ui/gtk/voip_calls_dlg.c +++ b/ui/gtk/voip_calls_dlg.c @@ -213,11 +213,11 @@ voip_calls_on_filter(GtkButton *button _U_, gpointer user_data _U_) /* Build a new filter based on frame numbers */ lista = g_list_first(voip_calls_get_info()->callsinfo_list); while (lista) { - listinfo = lista->data; + listinfo = (voip_calls_info_t *)lista->data; if (listinfo->selected) { listb = g_list_first(voip_calls_get_info()->graph_analysis->list); while (listb) { - gai = listb->data; + gai = (graph_analysis_item_t *)listb->data; if (gai->conv_num == listinfo->call_num) { g_string_append_printf(filter_string_fwd, "%sframe.number == %u", is_first?"":" or ", gai->fd->num); is_first = FALSE; @@ -242,20 +242,20 @@ voip_calls_on_filter(GtkButton *button _U_, gpointer user_data _U_) /* Build a new filter based on protocol fields */ lista = g_list_first(voip_calls_get_info()->callsinfo_list); while (lista) { - listinfo = lista->data; + listinfo = (voip_calls_info_t *)lista->data; if (listinfo->selected) { if (!is_first) g_string_append_printf(filter_string_fwd, " or "); switch (listinfo->protocol) { case VOIP_SIP: - sipinfo = listinfo->prot_info; + sipinfo = (sip_calls_info_t *)listinfo->prot_info; g_string_append_printf(filter_string_fwd, "(sip.Call-ID == \"%s\")", sipinfo->call_identifier ); break; case VOIP_ISUP: - isupinfo = listinfo->prot_info; + isupinfo = (isup_calls_info_t *)listinfo->prot_info; g_string_append_printf(filter_string_fwd, "(isup.cic == %i and frame.number >= %i and frame.number <= %i and mtp3.network_indicator == %i and ((mtp3.dpc == %i) and (mtp3.opc == %i)) or ((mtp3.dpc == %i) and (mtp3.opc == %i)))", isupinfo->cic, listinfo->start_fd->num, @@ -265,7 +265,7 @@ voip_calls_on_filter(GtkButton *button _U_, gpointer user_data _U_) ); break; case VOIP_H323: - h323info = listinfo->prot_info; + h323info = (h323_calls_info_t *)listinfo->prot_info; g_string_append_printf(filter_string_fwd, "((h225.guid == %s || q931.call_ref == %x:%x || q931.call_ref == %x:%x)", guid_to_str(&h323info->guid[0]), @@ -275,7 +275,7 @@ voip_calls_on_filter(GtkButton *button _U_, gpointer user_data _U_) (guint8)((h323info->q931_crv2 & 0xff00)>>8)); listb = g_list_first(h323info->h245_list); while (listb) { - h245_add = listb->data; + h245_add = (h245_address_t *)listb->data; g_string_append_printf(filter_string_fwd, " || (ip.addr == %s && tcp.port == %d && h245)", ip_to_str((guint8 *)(h245_add->h245_address.data)), h245_add->h245_port); @@ -284,7 +284,7 @@ voip_calls_on_filter(GtkButton *button _U_, gpointer user_data _U_) g_string_append_printf(filter_string_fwd, ")"); break; case TEL_H248: - ctx = listinfo->prot_info; + ctx = (gcp_ctx_t *)listinfo->prot_info; g_string_append_printf(filter_string_fwd, "(h248.ctx == 0x%x)", ctx->id); break; @@ -351,7 +351,7 @@ on_graph_bt_clicked(GtkButton *button _U_, gpointer user_data _U_) /* reset the "display" parameter in graph analysis */ listb = g_list_first(voip_calls_get_info()->graph_analysis->list); while (listb) { - gai = listb->data; + gai = (graph_analysis_item_t *)listb->data; gai->display = FALSE; listb = g_list_next(listb); } @@ -359,11 +359,11 @@ on_graph_bt_clicked(GtkButton *button _U_, gpointer user_data _U_) /* set the display for selected calls */ lista = g_list_first(voip_calls_get_info()->callsinfo_list); while (lista) { - listinfo = lista->data; + listinfo = (voip_calls_info_t *)lista->data; if (listinfo->selected) { listb = g_list_first(voip_calls_get_info()->graph_analysis->list); while (listb) { - gai = listb->data; + gai = (graph_analysis_item_t *)listb->data; if (gai->conv_num == listinfo->call_num) { gai->display = TRUE; } @@ -450,12 +450,12 @@ add_to_list_store(voip_calls_info_t* strinfo) /* Add comments based on the protocol */ switch (strinfo->protocol) { case VOIP_ISUP: - isupinfo = strinfo->prot_info; + isupinfo = (isup_calls_info_t *)strinfo->prot_info; g_snprintf(field[CALL_COL_COMMENTS],30, "%i-%i -> %i-%i", isupinfo->ni, isupinfo->opc, isupinfo->ni, isupinfo->dpc); break; case VOIP_H323: - h323info = strinfo->prot_info; + h323info = (h323_calls_info_t *)strinfo->prot_info; if (strinfo->call_state == VOIP_CALL_SETUP) flag = h323info->is_faststart_Setup; else diff --git a/ui/gtk/wlan_stat_dlg.c b/ui/gtk/wlan_stat_dlg.c index fe2b569259..9998055b94 100644 --- a/ui/gtk/wlan_stat_dlg.c +++ b/ui/gtk/wlan_stat_dlg.c @@ -237,7 +237,7 @@ alloc_wlan_ep (struct _wlan_hdr *si, packet_info *pinfo _U_) if (!si) return NULL; - ep = g_malloc (sizeof(wlan_ep_t)); + ep = (wlan_ep_t *)g_malloc (sizeof(wlan_ep_t)); SE_COPY_ADDRESS (&ep->bssid, &si->bssid); ep->stats.channel = si->stats.channel; @@ -263,7 +263,7 @@ alloc_wlan_details_ep (address *addr) if (!addr) return NULL; - if (!(d_ep = g_malloc (sizeof(wlan_details_ep_t)))) + if (!(d_ep = (wlan_details_ep_t *)g_malloc (sizeof(wlan_details_ep_t)))) return NULL; SE_COPY_ADDRESS (&d_ep->addr, addr); @@ -1481,7 +1481,7 @@ wlan_create_popup_menu(wlanstat_t *hs) action_group = gtk_action_group_new ("WlanFilterPopupActionGroup"); gtk_action_group_add_actions (action_group, /* the action group */ - (gpointer)wlans_stat_popup_entries, /* an array of action descriptions */ + (GtkActionEntry *)wlans_stat_popup_entries, /* an array of action descriptions */ G_N_ELEMENTS(wlans_stat_popup_entries), /* the number of entries */ hs); /* data to pass to the action callbacks */ @@ -1698,7 +1698,7 @@ wlan_details_create_popup_menu(wlanstat_t *hs) action_group = gtk_action_group_new ("WlanDetailsPopupActionGroup"); gtk_action_group_add_actions (action_group, /* the action group */ - (gpointer)wlan_details_list_popup_entries, /* an array of action descriptions */ + (GtkActionEntry *)wlan_details_list_popup_entries, /* an array of action descriptions */ G_N_ELEMENTS(wlan_details_list_popup_entries), /* the number of entries */ hs); /* data to pass to the action callbacks */ @@ -1743,7 +1743,7 @@ wlanstat_dlg_create (void) char title[256]; gint i; - hs = g_malloc (sizeof(wlanstat_t)); + hs = (wlanstat_t *)g_malloc (sizeof(wlanstat_t)); hs->num_entries = 0; hs->ep_list = NULL; hs->number_of_packets = 0; @@ -1929,16 +1929,16 @@ wlanstat_dlg_create (void) gtk_box_pack_end (GTK_BOX(vbox), bbox, FALSE, FALSE, 0); - close_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + close_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button (wlanstat_dlg_w, close_bt, window_cancel_button_cb); - copy_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_COPY); + copy_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_COPY); /* gtk_button_set_label(GTK_BUTTON(copy_bt), "Copy Overview"); */ gtk_widget_set_tooltip_text(copy_bt, "Copy all statistical values of this page to the clipboard in CSV (Comma Separated Values) format."); g_signal_connect(copy_bt, "clicked", G_CALLBACK(wlan_copy_as_csv), hs->table); - help_bt = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP); + help_bt = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_HELP); g_signal_connect(help_bt, "clicked", G_CALLBACK(topic_cb), (gpointer)HELP_STATS_WLAN_TRAFFIC_DIALOG); g_signal_connect (wlanstat_dlg_w, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); diff --git a/ui/gtk/wsp_stat.c b/ui/gtk/wsp_stat.c index c958003339..f5353dd1df 100644 --- a/ui/gtk/wsp_stat.c +++ b/ui/gtk/wsp_stat.c @@ -114,7 +114,7 @@ wsp_draw_statuscode(gchar *key _U_, wsp_status_code_t *data, gchar *unused _U_) static void wspstat_reset(void *psp) { - wspstat_t *sp = psp; + wspstat_t *sp = (wspstat_t *)psp; guint32 i; for(i=1; i<=sp->num_pdus; i++) @@ -158,19 +158,19 @@ index2pdut(gint pdut) static int wspstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const void *pri) { - wspstat_t *sp = psp; - const wsp_info_value_t *value = pri; + wspstat_t *sp = (wspstat_t *)psp; + const wsp_info_value_t *value = (wsp_info_value_t *)pri; gint idx = pdut2index(value->pdut); gboolean retour = FALSE; if (value->status_code != 0) { wsp_status_code_t *sc; - sc = g_hash_table_lookup( + sc = (wsp_status_code_t *)g_hash_table_lookup( sp->hash, GINT_TO_POINTER(value->status_code)); if (!sc) { g_warning("%s:%d What's Wrong, doc ?\n", __FILE__, __LINE__); - sc = g_malloc(sizeof(wsp_status_code_t)); + sc = (wsp_status_code_t *)g_malloc(sizeof(wsp_status_code_t)); sc -> packets = 1; sc -> name = NULL; sc -> widget = NULL; @@ -199,7 +199,7 @@ wspstat_packet(void *psp, packet_info *pinfo _U_, epan_dissect_t *edt _U_, const static void wspstat_draw(void *psp) { - wspstat_t *sp = psp; + wspstat_t *sp = (wspstat_t *)psp; guint32 i; char str[256]; @@ -304,7 +304,7 @@ gtk_wspstat_init(const char *opt_arg, void *userdata _U_) filter = NULL; } - sp = g_malloc(sizeof(wspstat_t)); + sp = (wspstat_t *)g_malloc(sizeof(wspstat_t)); sp->win = dlg_window_new("wsp-stat"); /* transient_for top_level */ gtk_window_set_destroy_with_parent(GTK_WINDOW(sp->win), TRUE); @@ -312,7 +312,7 @@ gtk_wspstat_init(const char *opt_arg, void *userdata _U_) wsp_vals_status_p = VALUE_STRING_EXT_VS_P(&wsp_vals_status_ext); for (i=0; wsp_vals_status_p[i].strptr; i++) { - sc = g_malloc(sizeof(wsp_status_code_t)); + sc = (wsp_status_code_t *)g_malloc(sizeof(wsp_status_code_t)); sc->name = wsp_vals_status_p[i].strptr; sc->packets = 0; sc->widget = NULL; @@ -323,7 +323,7 @@ gtk_wspstat_init(const char *opt_arg, void *userdata _U_) sc); } sp->num_pdus = 16; - sp->pdu_stats = g_malloc((sp->num_pdus+1) * sizeof(wsp_pdu_t)); + sp->pdu_stats = (wsp_pdu_t *)g_malloc((sp->num_pdus+1) * sizeof(wsp_pdu_t)); if (filter) { sp->filter = g_strdup(filter); title = g_strdup_printf("Wireshark: WAP-WSP statistics with filter: %s", filter); @@ -385,7 +385,7 @@ gtk_wspstat_init(const char *opt_arg, void *userdata _U_) bbox = dlg_button_row_new(GTK_STOCK_CLOSE, NULL); gtk_box_pack_start(GTK_BOX(main_vb), bbox, FALSE, FALSE, 0); - bt_close = g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); + bt_close = (GtkWidget *)g_object_get_data(G_OBJECT(bbox), GTK_STOCK_CLOSE); window_set_cancel_button(sp->win, bt_close, window_cancel_button_cb); g_signal_connect(sp->win, "delete_event", G_CALLBACK(window_delete_event_cb), NULL); -- cgit v1.2.3