summaryrefslogtreecommitdiffstats
path: root/gtk/src/callbacks.c
diff options
context:
space:
mode:
authorjstebbins <[email protected]>2008-09-07 17:06:39 +0000
committerjstebbins <[email protected]>2008-09-07 17:06:39 +0000
commitb97863af3eb0b376403de71d89b070d65b6bbe9b (patch)
tree50d537dbb11c6f1ebd3febf095dc3932401563a6 /gtk/src/callbacks.c
parent5917f628bf5aa7d6c19aa4bb67588ef064dc709c (diff)
LinGui: Fix several strict-aliasing warnings and a null pointer dereference
that can happen if preferences don't yet exist and your running the app over an ssh session. git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1673 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'gtk/src/callbacks.c')
-rw-r--r--gtk/src/callbacks.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/gtk/src/callbacks.c b/gtk/src/callbacks.c
index ff07928dc..a4f7af21c 100644
--- a/gtk/src/callbacks.c
+++ b/gtk/src/callbacks.c
@@ -196,7 +196,10 @@ ghb_check_all_depencencies(signal_user_data_t *ud)
g_debug("ghb_check_all_depencencies ()");
ghb_dict_iter_init(&iter, rev_map);
- while (g_hash_table_iter_next(&iter, (gpointer*)&dep_name, (gpointer*)&value))
+ // middle (void*) cast prevents gcc warning "defreferencing type-punned
+ // pointer will break strict-aliasing rules"
+ while (g_hash_table_iter_next(
+ &iter, (gpointer*)(void*)&dep_name, (gpointer*)(void*)&value))
{
gboolean sensitive;
dep_object = gtk_builder_get_object (ud->builder, dep_name);