summaryrefslogtreecommitdiff
path: root/applets/clock/clock-location-tile.c
diff options
context:
space:
mode:
authorrbuj <[email protected]>2020-08-04 13:11:42 +0200
committerraveit65 <[email protected]>2020-09-07 09:11:05 +0200
commit8f8b7316cc7504a4618705c562ead1ae65dabbdc (patch)
treec536e6c8079781851f2456528042e19497ee5315 /applets/clock/clock-location-tile.c
parent59da25f28bc2678cc38bc1def53ca1c4dbf9cc0b (diff)
downloadmate-panel-8f8b7316cc7504a4618705c562ead1ae65dabbdc.tar.bz2
mate-panel-8f8b7316cc7504a4618705c562ead1ae65dabbdc.tar.xz
Remove variableScope warnings reported by cppcheck
cppcheck --enable=all . 2> err.txt grep variableScope err.txt
Diffstat (limited to 'applets/clock/clock-location-tile.c')
-rw-r--r--applets/clock/clock-location-tile.c12
1 files changed, 5 insertions, 7 deletions
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);