1
0
Fork 0
mirror of https://gitlab.gnome.org/GNOME/calls.git synced 2024-12-12 07:37:35 +00:00

notifier: Fix compile warning

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.
This commit is contained in:
Guido Günther 2021-03-01 10:02:30 +01:00
parent 994853910d
commit 97c2dde0eb

View file

@ -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);