From 4a2b89d4c62759814e592c8211d7a4aa7a24d76f Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" Date: Fri, 4 Dec 2015 12:23:37 +0100 Subject: gtk: fix build warning MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit CC [M] build-x86_64/modules/gtk/gtk_mod.o modules/gtk/gtk_mod.c: In function ‘notify_incoming_call’: modules/gtk/gtk_mod.c:340:2: warning: ISO C90 forbids mixed declarations and code [-Wdeclaration-after-statement] --- modules/gtk/gtk_mod.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'modules/gtk/gtk_mod.c') diff --git a/modules/gtk/gtk_mod.c b/modules/gtk/gtk_mod.c index 67f40cb..83000d6 100644 --- a/modules/gtk/gtk_mod.c +++ b/modules/gtk/gtk_mod.c @@ -308,6 +308,9 @@ static void notify_incoming_call(struct gtk_mod *mod, const char *msg = call_peeruri(call); GtkWidget *call_menu; GtkWidget *menu_item; +#if defined(USE_LIBNOTIFY) + NotifyNotification *notification; +#endif #if GLIB_CHECK_VERSION(2,40,0) char id[64]; @@ -337,8 +340,7 @@ static void notify_incoming_call(struct gtk_mod *mod, /* If glib does not have GNotification, use libnotify instead. */ if (!notify_is_initted()) return; - NotifyNotification* notification = notify_notification_new(title, - msg, "baresip"); + notification = notify_notification_new(title, msg, "baresip"); notify_notification_set_urgency(notification, NOTIFY_URGENCY_CRITICAL); notify_notification_show(notification, NULL); g_object_unref(notification); -- cgit v1.2.3