summaryrefslogtreecommitdiffstats
path: root/gtk/src/values.c
diff options
context:
space:
mode:
Diffstat (limited to 'gtk/src/values.c')
-rw-r--r--gtk/src/values.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/src/values.c b/gtk/src/values.c
index 8ef3bf365..b6be28af4 100644
--- a/gtk/src/values.c
+++ b/gtk/src/values.c
@@ -528,7 +528,10 @@ dict_copy(gpointer boxed)
dict_delete_key, dict_delete_value);
g_hash_table_iter_init(&iter, dict);
- while (g_hash_table_iter_next(&iter, (gpointer*)&key, (gpointer*)&gval))
+ // middle (void*) cast prevents gcc warning "defreferencing type-punned
+ // pointer will break strict-aliasing rules"
+ while (g_hash_table_iter_next(
+ &iter, (gpointer*)(void*)&key, (gpointer*)(void*)&gval))
{
g_hash_table_insert(copy, g_strdup(key), ghb_value_dup(gval));
}