Skip to content

Commit

Permalink
Fix build warnings about missing field initializer
Browse files Browse the repository at this point in the history
  • Loading branch information
rbuj authored and lukefromdc committed Dec 13, 2022
1 parent ea23cc8 commit 7da955f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
10 changes: 6 additions & 4 deletions src/capplet/mate-notification-properties.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand All @@ -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;
}
2 changes: 1 addition & 1 deletion src/daemon/mnd-daemon.c
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static GOptionEntry entries[] =
NULL
},
{
NULL
NULL, 0, 0, G_OPTION_ARG_NONE, NULL, NULL, NULL
}
};

Expand Down

0 comments on commit 7da955f

Please sign in to comment.