diff options
author | rbuj <[email protected]> | 2021-10-28 13:02:53 +0200 |
---|---|---|
committer | Luke from DC <[email protected]> | 2022-12-13 02:51:58 +0000 |
commit | 7da955fada978e6f34043cc2e190dd3237c7dc3b (patch) | |
tree | 4984d9aa0bf556fa941ad11c74aecbd2c554d398 | |
parent | ea23cc8b33a753ab17b8f698898b1b715223a895 (diff) | |
download | mate-notification-daemon-7da955fada978e6f34043cc2e190dd3237c7dc3b.tar.bz2 mate-notification-daemon-7da955fada978e6f34043cc2e190dd3237c7dc3b.tar.xz |
Fix build warnings about missing field initializer
-rw-r--r-- | src/capplet/mate-notification-properties.c | 10 | ||||
-rw-r--r-- | 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 10f99d5..d8ce983 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 fde743d..38a5589 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 } }; |