From ba7657cb19f3a221c842bbf12b1efc2ac12c9dc0 Mon Sep 17 00:00:00 2001 From: Guy Harris Date: Tue, 20 Feb 2018 11:51:40 -0800 Subject: Cast away constness at the point where it can't be avoided. The only reason why we have to cast it away is that C doesn't have a good framework for creating collections of objects of arbitrary type (where type includes constness) and we're using a datatype (GHashTable) implemented and declared in C here. Do it in the g_hash_table_insert() call. Change-Id: Ibd7706255519a97b77e4e4a52fada43e050f2bf0 Reviewed-on: https://code.wireshark.org/review/25938 Reviewed-by: Guy Harris --- ui/qt/wireless_timeline.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/qt/wireless_timeline.cpp b/ui/qt/wireless_timeline.cpp index dbe90f2774..d4c30d6132 100644 --- a/ui/qt/wireless_timeline.cpp +++ b/ui/qt/wireless_timeline.cpp @@ -360,10 +360,10 @@ void WirelessTimeline::tap_timeline_reset(void* tapdata) gboolean WirelessTimeline::tap_timeline_packet(void *tapdata, packet_info* pinfo, epan_dissect_t* edt _U_, const void *data) { WirelessTimeline* timeline = (WirelessTimeline*)tapdata; - struct wlan_radio *wlan_radio_info = (struct wlan_radio *)data; + const struct wlan_radio *wlan_radio_info = (const struct wlan_radio *)data; /* Save the radio information in our own (GUI) hashtable */ - g_hash_table_insert(timeline->radio_packet_list, GUINT_TO_POINTER(pinfo->num), wlan_radio_info); + g_hash_table_insert(timeline->radio_packet_list, GUINT_TO_POINTER(pinfo->num), (gpointer)wlan_radio_info); return FALSE; } -- cgit v1.2.3