mu: fix some compiler warnings

and whitespace.
This commit is contained in:
Dirk-Jan C. Binnema 2021-03-12 22:20:48 +02:00
parent 6e9bfb6300
commit 6e9a60c385
2 changed files with 28 additions and 25 deletions

View File

@ -1,5 +1,5 @@
/*
** Copyright (C) 2011-2020 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
** Copyright (C) 2011-2021 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
**
** This program is free software; you can redistribute it and/or modify it
** under the terms of the GNU General Public License as published by the
@ -310,9 +310,13 @@ SCM_DEFINE (get_contacts, "mu:c:get-contacts", 2, 0, 0,
ecdata.lst = SCM_EOL;
msgwrap = (MuMsgWrapper*) SCM_CDR(MSG);
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wcast-function-type"
mu_msg_contact_foreach (msgwrap->_msg,
(MuMsgContactForeachFunc)contacts_to_list,
&ecdata);
#pragma GCC diagnostic pop
/* explicitly close the file backend, so we won't run out of fds */
mu_msg_unload_msg_file (msgwrap->_msg);

View File

@ -1,5 +1,5 @@
/*
** Copyright (C) 2012-2020 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
** Copyright (C) 2012-2021 Dirk-Jan C. Binnema <djcb@djcbsoftware.nl>
**
** This program is free software; you can redistribute it and/or modify it
** under the terms of the GNU General Public License as published by the
@ -137,8 +137,7 @@ mu_script_info_matches_regex (MuScriptInfo *msi, const char *rxstr,
void
mu_script_info_list_destroy (GSList *lst)
{
g_slist_foreach (lst, (GFunc)script_info_destroy, NULL);
g_slist_free (lst);
g_slist_free_full(lst, (GDestroyNotify)script_info_destroy);
}