$NetBSD: patch-ab,v 1.2 2006/04/07 17:40:22 rpaulo Exp $

--- src/main.c.orig	2006-02-14 18:04:43.000000000 +0000
+++ src/main.c	2006-04-06 21:53:15.000000000 +0100
@@ -378,6 +378,7 @@ int update_interface ()
 void playlist_changed(MpdObj *mi)
 {
 	MpdData *data = NULL;
+	char *string;
 	long long new_playlist_id = mpd_playlist_get_playlist_id(connection);
 	/*
 	 * so I don't have to check all the time
@@ -387,7 +388,7 @@ void playlist_changed(MpdObj *mi)
 	gchar buffer[1024];
 	debug_printf(DEBUG_INFO, "playlist changed length: %i %i\n",info.playlist_length, mpd_playlist_get_playlist_length(mi));
 	old_length = info.playlist_length;
-	char *string = cfg_get_single_value_as_string_with_default(config,
+	string = cfg_get_single_value_as_string_with_default(config,
 			"playlist","markup", DEFAULT_PLAYLIST_MARKUP);
 
 	data = mpd_playlist_get_changes(mi,info.playlist_id);
@@ -804,6 +805,7 @@ void password_dialog(int failed)
 void error_callback(MpdObj *mi, int error_id, char *error_msg, gpointer data)
 {
 	int autoconnect = cfg_get_single_value_as_int_with_default(config, "connection","autoconnect", DEFAULT_AUTOCONNECT);
+	GtkWidget *dialog;
 	/* if we are not connected we show a reconnect */
 	if(!mpd_check_connected(mi))
 	{
@@ -816,7 +818,7 @@ void error_callback(MpdObj *mi, int erro
 			gchar *path = gmpc_get_full_glade_path("gmpc.glade");
 			xml_error_window = glade_xml_new(path,"error_dialog",NULL);
 			g_free(path);
-			GtkWidget *dialog = glade_xml_get_widget(xml_error_window, "error_dialog");
+			dialog = glade_xml_get_widget(xml_error_window, "error_dialog");
 			gtk_label_set_markup(GTK_LABEL(glade_xml_get_widget(xml_error_window,"em_label")), str);
 			gtk_widget_show_all(dialog);
 			g_signal_connect(G_OBJECT(dialog), "response", G_CALLBACK(error_window_destroy), GINT_TO_POINTER(autoconnect));
@@ -842,7 +844,7 @@ void error_callback(MpdObj *mi, int erro
 		}
 		else {
 
-			GtkWidget *dialog = gtk_message_dialog_new_with_markup(NULL,
+			dialog = gtk_message_dialog_new_with_markup(NULL,
 					GTK_DIALOG_MODAL,
 					GTK_MESSAGE_ERROR,
 					GTK_BUTTONS_CLOSE,
