From 8f8b7316cc7504a4618705c562ead1ae65dabbdc Mon Sep 17 00:00:00 2001 From: rbuj Date: Tue, 4 Aug 2020 13:11:42 +0200 Subject: Remove variableScope warnings reported by cppcheck cppcheck --enable=all . 2> err.txt grep variableScope err.txt --- applets/clock/clock-location-tile.c | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'applets/clock/clock-location-tile.c') diff --git a/applets/clock/clock-location-tile.c b/applets/clock/clock-location-tile.c index 4e0d71a2..55bc749a 100644 --- a/applets/clock/clock-location-tile.c +++ b/applets/clock/clock-location-tile.c @@ -173,14 +173,12 @@ press_on_tile (GtkWidget *widget, static void make_current_cb (gpointer data, GError *error) { - GtkWidget *dialog; - if (error) { - dialog = gtk_message_dialog_new (NULL, - 0, - GTK_MESSAGE_ERROR, - GTK_BUTTONS_CLOSE, - _("Failed to set the system timezone")); + GtkWidget *dialog = gtk_message_dialog_new (NULL, + 0, + GTK_MESSAGE_ERROR, + GTK_BUTTONS_CLOSE, + _("Failed to set the system timezone")); gtk_message_dialog_format_secondary_text (GTK_MESSAGE_DIALOG (dialog), "%s", error->message); g_signal_connect (dialog, "response", G_CALLBACK (gtk_widget_destroy), NULL); -- cgit v1.2.1