File streamtuner-type_punning.patch of Package streamtuner

--- src/streamtuner/st-network-preferences-page.c
+++ src/streamtuner/st-network-preferences-page.c
@@ -183,10 +183,10 @@
   st_preferences_bind_boolean(GTK_TOGGLE_BUTTON(page->priv->proxy_check),
 			      &st_settings.proxy_enabled);
   st_preferences_bind_int_radio(GTK_RADIO_BUTTON(page->priv->http_radio),
-				(int *) &st_settings.proxy_type,
+				&st_settings.proxy_type,
 				ST_TRANSFER_PROXY_HTTP);
   st_preferences_bind_int_radio(GTK_RADIO_BUTTON(page->priv->socks5_radio),
-				(int *) &st_settings.proxy_type,
+				&st_settings.proxy_type,
 				ST_TRANSFER_PROXY_SOCKS5);
   st_preferences_bind_string(GTK_ENTRY(page->priv->server_entry),
 			     &st_settings.proxy_server);
--- src/streamtuner/st-preferences.c
+++ src/streamtuner/st-preferences.c
@@ -140,13 +140,13 @@
 }
 
 void
-st_preferences_bind_int_radio (GtkRadioButton *radio, int *ptr, int value)
+st_preferences_bind_int_radio (GtkRadioButton *radio, void *ptr, int value)
 {
   g_return_if_fail(GTK_IS_RADIO_BUTTON(radio));
   g_return_if_fail(ptr != NULL);
 
   g_object_set_data(G_OBJECT(radio), "value", GINT_TO_POINTER(value));
-  gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio), value == *ptr);
+  gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(radio), value == *(int *)ptr);
   g_signal_connect(radio, "toggled", G_CALLBACK(st_preferences_radio_toggled_h), ptr);
 }
 
--- src/streamtuner/st-preferences.h
+++ src/streamtuner/st-preferences.h
@@ -42,7 +42,7 @@
 void st_preferences_bind_int_spin	(GtkSpinButton		*spin,
 					 int			*ptr);
 void st_preferences_bind_int_radio	(GtkRadioButton		*radio,
-					 int			*ptr,
+					 void			*ptr,
 					 int			value);
 
 #endif /* _ST_PREFERENCES_H */
--- src/streamtuner/st-shell.c
+++ src/streamtuner/st-shell.c
@@ -465,8 +465,10 @@
 static void
 st_shell_make_window (STShell *shell)
 {
+  union { GtkWidget **wpp; gpointer *gpp; }pun = { &shell->priv->window };
+
   shell->priv->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
-  g_object_add_weak_pointer(G_OBJECT(shell->priv->window), (gpointer *) &shell->priv->window);
+  g_object_add_weak_pointer(G_OBJECT(shell->priv->window), pun.gpp);
 
   shell->priv->accel_group = gtk_accel_group_new();
   gtk_window_add_accel_group(GTK_WINDOW(shell->priv->window), shell->priv->accel_group);
@@ -1786,8 +1788,10 @@
     gtk_window_present(GTK_WINDOW(shell->priv->find));
   else
     {
+      union { GtkWidget **wpp; gpointer *gpp; }pun = { &shell->priv->find };
+
       shell->priv->find = sgtk_find_dialog_new(GTK_WINDOW(shell->priv->window));
-      g_object_add_weak_pointer(G_OBJECT(shell->priv->find), (gpointer *) &shell->priv->find);
+      g_object_add_weak_pointer(G_OBJECT(shell->priv->find), pun.gpp);
 
       sgtk_find_dialog_set_token(SGTK_FIND_DIALOG(shell->priv->find), st_settings.find_token ? st_settings.find_token : "");
       sgtk_find_dialog_set_history(SGTK_FIND_DIALOG(shell->priv->find), st_settings.find_history);
@@ -2101,8 +2105,9 @@
     gtk_window_present(GTK_WINDOW(shell->priv->stream_properties));
   else
     {
+      union { GtkWidget **wpp; gpointer *gpp; }pun = { &shell->priv->stream_properties };
       shell->priv->stream_properties = st_stream_properties_dialog_new(GTK_WINDOW(shell->priv->window));
-      g_object_add_weak_pointer(G_OBJECT(shell->priv->stream_properties), (gpointer *) &shell->priv->stream_properties);
+      g_object_add_weak_pointer(G_OBJECT(shell->priv->stream_properties), pun.gpp);
 
       g_signal_connect(shell->priv->stream_properties,
 		       "response",
@@ -2161,9 +2166,10 @@
   else
     {
       STBrowserTab *selected_tab;
+      union { GtkWidget **wpp; gpointer *gpp; }pun = { &shell->priv->stream_columns };
 
       shell->priv->stream_columns = st_stream_columns_dialog_new(GTK_WINDOW(shell->priv->window));
-      g_object_add_weak_pointer(G_OBJECT(shell->priv->stream_columns), (gpointer *) &shell->priv->stream_columns);
+      g_object_add_weak_pointer(G_OBJECT(shell->priv->stream_columns), pun.gpp);
 
       selected_tab = st_shell_get_selected_tab(shell);
       if (selected_tab)
@@ -2195,8 +2201,10 @@
     gtk_window_present(GTK_WINDOW(shell->priv->about));
   else
     {
+     union { GtkWidget **wpp; gpointer *gpp; }pun = { &shell->priv->about };
+
       shell->priv->about = st_about_dialog_new(GTK_WINDOW(shell->priv->window));
-      g_object_add_weak_pointer(G_OBJECT(shell->priv->about), (gpointer *) &shell->priv->about);
+      g_object_add_weak_pointer(G_OBJECT(shell->priv->about), pun.gpp);
 
       g_signal_connect(shell->priv->about,
 		       "response",
@@ -2244,8 +2252,10 @@
 
   if (! shell->priv->preferences)
     {
+      union { GtkWidget **wpp; gpointer *gpp; }pun = { &shell->priv->preferences };
+
       shell->priv->preferences = st_preferences_dialog_new(GTK_WINDOW(shell->priv->window));
-      g_object_add_weak_pointer(G_OBJECT(shell->priv->preferences), (gpointer *) &shell->priv->preferences);
+      g_object_add_weak_pointer(G_OBJECT(shell->priv->preferences), pun.gpp);
     }
 
   if (handler)