From 97c2dde0eb6bec60117b1918e7831411e5b5f1f9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Guido=20G=C3=BCnther?= Date: Mon, 1 Mar 2021 10:02:30 +0100 Subject: [PATCH] notifier: Fix compile warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes ../src/calls-notifier.c: In function ‘state_changed_cb’: /usr/include/glib-2.0/glib/gmacros.h:1132:17: warning: ‘notification’ may be used uninitialized in this function [-Wmaybe-uninitialized] which wasn't problematic with the current code flow but can easily become a problem when shuffling stuff around. --- src/calls-notifier.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/calls-notifier.c b/src/calls-notifier.c index 14eea8a..1c88fb0 100644 --- a/src/calls-notifier.c +++ b/src/calls-notifier.c @@ -43,15 +43,13 @@ static void notify (CallsNotifier *self, CallsCall *call) { GApplication *app = g_application_get_default (); - g_autoptr (GNotification) notification; + g_autoptr (GNotification) notification = g_notification_new (_("Missed call")); g_autoptr (CallsBestMatch) contact = NULL; g_autofree gchar *msg = NULL; g_autofree gchar *ref = NULL; g_autofree gchar *label_callback = NULL; const char *name; - notification = g_notification_new (_("Missed call")); - contact = calls_call_get_contact (call); // TODO: We need to update the notification when the contact name changes name = calls_best_match_get_name (contact);