From 7da955fada978e6f34043cc2e190dd3237c7dc3b Mon Sep 17 00:00:00 2001 From: rbuj Date: Thu, 28 Oct 2021 13:02:53 +0200 Subject: [PATCH] Fix build warnings about missing field initializer --- src/capplet/mate-notification-properties.c | 10 ++++++---- src/daemon/mnd-daemon.c | 2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/capplet/mate-notification-properties.c b/src/capplet/mate-notification-properties.c index 10f99d5a..d8ce9836 100644 --- a/src/capplet/mate-notification-properties.c +++ b/src/capplet/mate-notification-properties.c @@ -509,11 +509,12 @@ static void notification_properties_dialog_finalize(NotificationAppletDialog* di notify_notification_close(dialog->preview, NULL); dialog->preview = NULL; } + g_free (dialog); } int main(int argc, char** argv) { - NotificationAppletDialog dialog = {NULL, }; /* <- ? */ + NotificationAppletDialog *dialog; #ifdef ENABLE_NLS bindtextdomain(GETTEXT_PACKAGE, NOTIFICATION_LOCALEDIR); @@ -525,15 +526,16 @@ int main(int argc, char** argv) notify_init("mate-notification-properties"); - if (!notification_properties_dialog_init(&dialog)) + dialog = g_new0 (NotificationAppletDialog, 1); + if (!notification_properties_dialog_init (dialog)) { - notification_properties_dialog_finalize(&dialog); + notification_properties_dialog_finalize (dialog); return 1; } gtk_main(); - notification_properties_dialog_finalize(&dialog); + notification_properties_dialog_finalize (dialog); return 0; } diff --git a/src/daemon/mnd-daemon.c b/src/daemon/mnd-daemon.c index fde743de..38a5589b 100644 --- a/src/daemon/mnd-daemon.c +++ b/src/daemon/mnd-daemon.c @@ -47,7 +47,7 @@ static GOptionEntry entries[] = NULL }, { - NULL + NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL } };