[Commits] [SCM] claws branch, master, updated. 3.16.0-93-g24d959c
wwp at claws-mail.org
wwp at claws-mail.org
Sat Mar 17 20:18:49 CET 2018
The branch, master has been updated
via 24d959c7d5c33eb49c138191ca1523c863e0b7d2 (commit)
from 86b4d2c073e7346b591f9270352d772b288f24a7 (commit)
Summary of changes:
src/avatars.c | 6 +++---
src/main.c | 8 ++++----
src/plugins/address_keeper/address_keeper.c | 2 +-
src/plugins/attachwarner/attachwarner.c | 2 +-
src/plugins/bogofilter/bogofilter.c | 8 ++++----
src/plugins/bsfilter/bsfilter.c | 8 ++++----
src/plugins/clamd/clamav_plugin.c | 2 +-
src/plugins/demo/demo.c | 2 +-
src/plugins/fetchinfo/fetchinfo_plugin.c | 2 +-
src/plugins/libravatar/libravatar.c | 8 ++++----
src/plugins/newmail/newmail.c | 2 +-
src/plugins/notification/notification_plugin.c | 2 +-
src/plugins/python/python_plugin.c | 2 +-
src/plugins/spamassassin/spamassassin.c | 10 +++++-----
src/statusbar.c | 6 +++---
15 files changed, 35 insertions(+), 35 deletions(-)
- Log -----------------------------------------------------------------
commit 24d959c7d5c33eb49c138191ca1523c863e0b7d2
Author: wwp <wwp at free.fr>
Date: Sat Mar 17 20:18:22 2018 +0100
Save us 35 warnings about hooks_register_hook() return checks.
diff --git a/src/avatars.c b/src/avatars.c
index ce03cdc..e731194 100644
--- a/src/avatars.c
+++ b/src/avatars.c
@@ -93,19 +93,19 @@ gboolean avatars_internal_rendering_hook(gpointer source, gpointer data)
void avatars_init(void)
{
- if (avatar_render_hook_id != -1) {
+ if (avatar_render_hook_id != (guint) -1) {
g_warning("Internal avatars rendering already initialized");
return;
}
avatar_render_hook_id = hooks_register_hook(AVATAR_IMAGE_RENDER_HOOKLIST, avatars_internal_rendering_hook, NULL);
- if (avatar_render_hook_id == -1) {
+ if (avatar_render_hook_id == (guint) -1) {
g_warning("Failed to register avatars internal rendering hook");
}
}
void avatars_done(void)
{
- if (avatar_render_hook_id != -1) {
+ if (avatar_render_hook_id != (guint) -1) {
hooks_unregister_hook(AVATAR_IMAGE_RENDER_HOOKLIST, avatar_render_hook_id);
avatar_render_hook_id = -1;
}
diff --git a/src/main.c b/src/main.c
index c404a3d..cb86e59 100644
--- a/src/main.c
+++ b/src/main.c
@@ -872,9 +872,9 @@ static void uninstall_dbus_status_handler(void)
if(awn_proxy)
g_object_unref(awn_proxy);
awn_proxy = NULL;
- if (dbus_item_hook_id != -1)
+ if (dbus_item_hook_id != (guint) -1)
hooks_unregister_hook(FOLDER_ITEM_UPDATE_HOOKLIST, dbus_item_hook_id);
- if (dbus_folder_hook_id != -1)
+ if (dbus_folder_hook_id != (guint) -1)
hooks_unregister_hook(FOLDER_UPDATE_HOOKLIST, dbus_folder_hook_id);
}
@@ -948,14 +948,14 @@ static void install_dbus_status_handler(void)
"/com/google/code/Awn",
"com.google.code.Awn");
dbus_item_hook_id = hooks_register_hook (FOLDER_ITEM_UPDATE_HOOKLIST, dbus_status_update_item_hook, NULL);
- if (dbus_item_hook_id == -1) {
+ if (dbus_item_hook_id == (guint) -1) {
g_warning("Failed to register folder item update hook");
uninstall_dbus_status_handler();
return;
}
dbus_folder_hook_id = hooks_register_hook (FOLDER_UPDATE_HOOKLIST, dbus_status_update_folder_hook, NULL);
- if (dbus_folder_hook_id == -1) {
+ if (dbus_folder_hook_id == (guint) -1) {
g_warning("Failed to register folder update hook");
uninstall_dbus_status_handler();
return;
diff --git a/src/plugins/address_keeper/address_keeper.c b/src/plugins/address_keeper/address_keeper.c
index d85d949..c85b6fb 100644
--- a/src/plugins/address_keeper/address_keeper.c
+++ b/src/plugins/address_keeper/address_keeper.c
@@ -248,7 +248,7 @@ gint plugin_init(gchar **error)
hook_id = hooks_register_hook(COMPOSE_CHECK_BEFORE_SEND_HOOKLIST,
addrk_before_send_hook, NULL);
- if (hook_id == -1) {
+ if (hook_id == (guint) -1) {
*error = g_strdup(_("Failed to register check before send hook"));
return -1;
}
diff --git a/src/plugins/attachwarner/attachwarner.c b/src/plugins/attachwarner/attachwarner.c
index 7ada74b..3f782f5 100644
--- a/src/plugins/attachwarner/attachwarner.c
+++ b/src/plugins/attachwarner/attachwarner.c
@@ -248,7 +248,7 @@ gint plugin_init(gchar **error)
hook_id = hooks_register_hook(COMPOSE_CHECK_BEFORE_SEND_HOOKLIST,
attwarn_before_send_hook, NULL);
- if (hook_id == -1) {
+ if (hook_id == (guint) -1) {
*error = g_strdup(_("Failed to register check before send hook"));
return -1;
}
diff --git a/src/plugins/bogofilter/bogofilter.c b/src/plugins/bogofilter/bogofilter.c
index 07a764b..85c5ddb 100644
--- a/src/plugins/bogofilter/bogofilter.c
+++ b/src/plugins/bogofilter/bogofilter.c
@@ -959,7 +959,7 @@ FolderItem *bogofilter_get_spam_folder(MsgInfo *msginfo)
gboolean plugin_done(void)
{
- if (hook_id != -1) {
+ if (hook_id != (guint) -1) {
bogofilter_unregister_hook();
}
#ifdef USE_PTHREAD
@@ -1021,9 +1021,9 @@ struct PluginFeature *plugin_provides(void)
void bogofilter_register_hook(void)
{
- if (hook_id == -1)
+ if (hook_id == (guint) -1)
hook_id = hooks_register_hook(MAIL_LISTFILTERING_HOOKLIST, mail_filtering_hook, NULL);
- if (hook_id == -1) {
+ if (hook_id == (guint) -1) {
g_warning("Failed to register mail filtering hook");
config.process_emails = FALSE;
}
@@ -1031,7 +1031,7 @@ void bogofilter_register_hook(void)
void bogofilter_unregister_hook(void)
{
- if (hook_id != -1) {
+ if (hook_id != (guint) -1) {
hooks_unregister_hook(MAIL_LISTFILTERING_HOOKLIST, hook_id);
}
hook_id = -1;
diff --git a/src/plugins/bsfilter/bsfilter.c b/src/plugins/bsfilter/bsfilter.c
index 127e677..9390983 100644
--- a/src/plugins/bsfilter/bsfilter.c
+++ b/src/plugins/bsfilter/bsfilter.c
@@ -592,7 +592,7 @@ FolderItem *bsfilter_get_spam_folder(MsgInfo *msginfo)
gboolean plugin_done(void)
{
- if (hook_id != -1) {
+ if (hook_id != (guint) -1) {
bsfilter_unregister_hook();
}
#ifdef USE_PTHREAD
@@ -654,9 +654,9 @@ struct PluginFeature *plugin_provides(void)
void bsfilter_register_hook(void)
{
- if (hook_id == -1)
+ if (hook_id == (guint) -1)
hook_id = hooks_register_hook(MAIL_FILTERING_HOOKLIST, mail_filtering_hook, NULL);
- if (hook_id == -1) {
+ if (hook_id == (guint) -1) {
g_warning("Failed to register mail filtering hook");
config.process_emails = FALSE;
}
@@ -664,7 +664,7 @@ void bsfilter_register_hook(void)
void bsfilter_unregister_hook(void)
{
- if (hook_id != -1) {
+ if (hook_id != (guint) -1) {
hooks_unregister_hook(MAIL_FILTERING_HOOKLIST, hook_id);
}
hook_id = -1;
diff --git a/src/plugins/clamd/clamav_plugin.c b/src/plugins/clamd/clamav_plugin.c
index 7653d47..8a2736c 100644
--- a/src/plugins/clamd/clamav_plugin.c
+++ b/src/plugins/clamd/clamav_plugin.c
@@ -276,7 +276,7 @@ gint plugin_init(gchar **error)
return -1;
hook_id = hooks_register_hook(MAIL_FILTERING_HOOKLIST, mail_filtering_hook, NULL);
- if (hook_id == -1) {
+ if (hook_id == (guint) -1) {
*error = g_strdup(_("Failed to register mail filtering hook"));
return -1;
}
diff --git a/src/plugins/demo/demo.c b/src/plugins/demo/demo.c
index 751c33f..d5f484c 100644
--- a/src/plugins/demo/demo.c
+++ b/src/plugins/demo/demo.c
@@ -48,7 +48,7 @@ gint plugin_init(gchar **error)
return -1;
hook_id = hooks_register_hook(LOG_APPEND_TEXT_HOOKLIST, my_log_hook, NULL);
- if (hook_id == -1) {
+ if (hook_id == (guint) -1) {
*error = g_strdup(_("Failed to register log text hook"));
return -1;
}
diff --git a/src/plugins/fetchinfo/fetchinfo_plugin.c b/src/plugins/fetchinfo/fetchinfo_plugin.c
index 04faead..bf350dd 100644
--- a/src/plugins/fetchinfo/fetchinfo_plugin.c
+++ b/src/plugins/fetchinfo/fetchinfo_plugin.c
@@ -162,7 +162,7 @@ gint plugin_init(gchar **error)
return -1;
mail_receive_hook_id = hooks_register_hook(MAIL_RECEIVE_HOOKLIST, mail_receive_hook, NULL);
- if (mail_receive_hook_id == (guint)-1) {
+ if (mail_receive_hook_id == (guint) -1) {
/* i18n: Possible error message during plugin load */
*error = g_strdup(_("Failed to register mail receive hook"));
return -1;
diff --git a/src/plugins/libravatar/libravatar.c b/src/plugins/libravatar/libravatar.c
index 7ce4341..b8da96c 100644
--- a/src/plugins/libravatar/libravatar.c
+++ b/src/plugins/libravatar/libravatar.c
@@ -313,12 +313,12 @@ static void missing_cache_done()
static void unregister_hooks()
{
- if (render_hook_id != -1) {
+ if (render_hook_id != (guint) -1) {
hooks_unregister_hook(AVATAR_IMAGE_RENDER_HOOKLIST,
render_hook_id);
render_hook_id = -1;
}
- if (update_hook_id != -1) {
+ if (update_hook_id != (guint) -1) {
hooks_unregister_hook(AVATAR_HEADER_UPDATE_HOOKLIST,
update_hook_id);
update_hook_id = -1;
@@ -341,7 +341,7 @@ gint plugin_init(gchar **error)
update_hook_id = hooks_register_hook(AVATAR_HEADER_UPDATE_HOOKLIST,
libravatar_header_update_hook,
NULL);
- if (update_hook_id == -1) {
+ if (update_hook_id == (guint) -1) {
*error = g_strdup(_("Failed to register avatar header update hook"));
return -1;
}
@@ -349,7 +349,7 @@ gint plugin_init(gchar **error)
render_hook_id = hooks_register_hook(AVATAR_IMAGE_RENDER_HOOKLIST,
libravatar_image_render_hook,
NULL);
- if (render_hook_id == -1) {
+ if (render_hook_id == (guint) -1) {
unregister_hooks();
*error = g_strdup(_("Failed to register avatar image render hook"));
return -1;
diff --git a/src/plugins/newmail/newmail.c b/src/plugins/newmail/newmail.c
index 5888748..1d77954 100644
--- a/src/plugins/newmail/newmail.c
+++ b/src/plugins/newmail/newmail.c
@@ -107,7 +107,7 @@ gint plugin_init (gchar **error)
return -1;
hook_id = hooks_register_hook (MAIL_POSTFILTERING_HOOKLIST, newmail_hook, NULL);
- if (hook_id == -1) {
+ if (hook_id == (guint) -1) {
*error = g_strdup (_("Failed to register newmail hook"));
return (-1);
}
diff --git a/src/plugins/notification/notification_plugin.c b/src/plugins/notification/notification_plugin.c
index 0da3c1f..1cc8c9f 100644
--- a/src/plugins/notification/notification_plugin.c
+++ b/src/plugins/notification/notification_plugin.c
@@ -302,7 +302,7 @@ gint plugin_init(gchar **error)
}
hook_theme_changed = hooks_register_hook(THEME_CHANGED_HOOKLIST, my_update_theme_hook, NULL);
- if(hook_theme_changed == (guint)-1) {
+ if(hook_theme_changed == (guint) -1) {
*error = g_strdup(_("Failed to register theme change hook in the "
"Notification plugin"));
hooks_unregister_hook(FOLDER_ITEM_UPDATE_HOOKLIST, hook_f_item);
diff --git a/src/plugins/python/python_plugin.c b/src/plugins/python/python_plugin.c
index 0b0d813..1634a76 100644
--- a/src/plugins/python/python_plugin.c
+++ b/src/plugins/python/python_plugin.c
@@ -653,7 +653,7 @@ gint plugin_init(gchar **error)
/* load hooks */
hook_compose_create = hooks_register_hook(COMPOSE_CREATED_HOOKLIST, my_compose_create_hook, NULL);
- if(hook_compose_create == (guint)-1) {
+ if(hook_compose_create == (guint) -1) {
*error = g_strdup(_("Failed to register \"compose create hook\" in the Python plugin"));
return -1;
}
diff --git a/src/plugins/spamassassin/spamassassin.c b/src/plugins/spamassassin/spamassassin.c
index 59fd92a..84aa9a6 100644
--- a/src/plugins/spamassassin/spamassassin.c
+++ b/src/plugins/spamassassin/spamassassin.c
@@ -513,7 +513,7 @@ gboolean spamassassin_check_username(void)
if (config.username == NULL || config.username[0] == '\0') {
config.username = (gchar*)g_get_user_name();
if (config.username == NULL) {
- if (hook_id != -1) {
+ if (hook_id != (guint) -1) {
spamassassin_unregister_hook();
}
procmsg_unregister_spam_learner(spamassassin_learn);
@@ -571,7 +571,7 @@ gint plugin_init(gchar **error)
gboolean plugin_done(void)
{
- if (hook_id != -1) {
+ if (hook_id != (guint) -1) {
spamassassin_unregister_hook();
}
g_free(config.hostname);
@@ -629,9 +629,9 @@ struct PluginFeature *plugin_provides(void)
void spamassassin_register_hook(void)
{
- if (hook_id == -1)
+ if (hook_id == (guint) -1)
hook_id = hooks_register_hook(MAIL_FILTERING_HOOKLIST, mail_filtering_hook, NULL);
- if (hook_id == -1) {
+ if (hook_id == (guint) -1) {
g_warning("Failed to register mail filtering hook");
config.process_emails = FALSE;
}
@@ -639,7 +639,7 @@ void spamassassin_register_hook(void)
void spamassassin_unregister_hook(void)
{
- if (hook_id != -1) {
+ if (hook_id != (guint) -1) {
hooks_unregister_hook(MAIL_FILTERING_HOOKLIST, hook_id);
}
hook_id = -1;
diff --git a/src/statusbar.c b/src/statusbar.c
index 13d6bb6..12fdb1d 100644
--- a/src/statusbar.c
+++ b/src/statusbar.c
@@ -37,7 +37,7 @@
#define BUFFSIZE 1024
static GList *statusbar_list = NULL;
-gint statusbar_puts_all_hook_id = -1;
+guint statusbar_puts_all_hook_id = -1;
GtkWidget *statusbar_create(void)
{
@@ -149,10 +149,10 @@ static gboolean statusbar_puts_all_hook (gpointer source, gpointer data)
void statusbar_verbosity_set(gboolean verbose)
{
- if (verbose && (statusbar_puts_all_hook_id == -1)) {
+ if (verbose && (statusbar_puts_all_hook_id == (guint) -1)) {
statusbar_puts_all_hook_id =
hooks_register_hook(LOG_APPEND_TEXT_HOOKLIST, statusbar_puts_all_hook, NULL);
- } else if (!verbose && (statusbar_puts_all_hook_id != -1)) {
+ } else if (!verbose && (statusbar_puts_all_hook_id != (guint) -1)) {
hooks_unregister_hook(LOG_APPEND_TEXT_HOOKLIST, statusbar_puts_all_hook_id);
statusbar_puts_all_hook_id = -1;
statusbar_pop_all();
-----------------------------------------------------------------------
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list