[Commits] [SCM] claws branch, master, updated. 3.9.2-121-g7eb6858
mones at claws-mail.org
mones at claws-mail.org
Sun Nov 17 19:58:19 CET 2013
The branch master of project "claws" (Claws Mail) has been updated
via 7eb6858477c1633c7957326edd6efe200cd091a5 (commit)
via f6ff237a84a3cd6cd12430ceed96294b28895137 (commit)
via a35fa2bcb535d69a2517314f8f3c3231ca4b4038 (commit)
via 8120aa01a5e0c8e7c7922c3a088772781f93ad5a (commit)
via 6b8fa181634ff157965ff6f109c174644143316a (commit)
via aa1049c6aea50094b53971a2730b8f6f9f533f3a (commit)
via 1b6c97420720160a6373cff94801d85e8729ed52 (commit)
via ec43d63eb0f4f0eefe55c114f7317e50148b83b4 (commit)
via a984e6a8825f7c4b70a2a88e24ace4c549e49186 (commit)
via 220a4478ca435cf7d86687831af1923308a65e8d (commit)
via 4e2a78fd7d642785fd74ae45ca15a8544bb8b743 (commit)
via 71537057d4c44ca2f450546db67fe7d9efb3e1cd (commit)
via 558d73fc9cc63ddd68619c9bc997532b54662a99 (commit)
from e3ce01887761c08afa087bd74df43acc80d53f7d (commit)
- Log -----------------------------------------------------------------
commit 7eb6858477c1633c7957326edd6efe200cd091a5
Author: Ricardo Mones <ricardo at mones.org>
Date: Sun Nov 17 19:56:24 2013 +0100
Clean ‘warning: variable 'self' set but not used’
From:
• gtk-hotkey-key-file-registry.c:87:28
• gtk-hotkey-key-file-registry.c:116:29
• gtk-hotkey-key-file-registry.c:134:28
• gtk-hotkey-key-file-registry.c:214:28
• gtk-hotkey-key-file-registry.c:321:28
• gtk-hotkey-key-file-registry.c:458:28
diff --git a/src/plugins/notification/gtkhotkey/gtk-hotkey-key-file-registry.c b/src/plugins/notification/gtkhotkey/gtk-hotkey-key-file-registry.c
index 8484468..02259a2 100644
--- a/src/plugins/notification/gtkhotkey/gtk-hotkey-key-file-registry.c
+++ b/src/plugins/notification/gtkhotkey/gtk-hotkey-key-file-registry.c
@@ -84,7 +84,6 @@ gtk_hotkey_key_file_registry_real_get_hotkey (GtkHotkeyRegistry *base,
const char *key_id,
GError **error)
{
- GtkHotkeyKeyFileRegistry *self;
GKeyFile *keyfile = NULL;
GtkHotkeyInfo *info = NULL;
@@ -92,8 +91,6 @@ gtk_hotkey_key_file_registry_real_get_hotkey (GtkHotkeyRegistry *base,
g_return_val_if_fail (app_id != NULL, NULL);
g_return_val_if_fail (key_id != NULL, NULL);
- self = GTK_HOTKEY_KEY_FILE_REGISTRY (base);
-
keyfile = get_hotkey_key_file (app_id, error);
if (keyfile == NULL)
goto clean_up;
@@ -113,12 +110,10 @@ gtk_hotkey_key_file_registry_real_get_application_hotkeys (GtkHotkeyRegistry *ba
const char *app_id,
GError **error)
{
- GtkHotkeyKeyFileRegistry *self;
GKeyFile *keyfile;
g_return_val_if_fail (app_id != NULL, NULL);
- self = GTK_HOTKEY_KEY_FILE_REGISTRY (base);
keyfile = get_hotkey_key_file (app_id, error);
if (keyfile == NULL)
@@ -131,14 +126,12 @@ gtk_hotkey_key_file_registry_real_get_application_hotkeys (GtkHotkeyRegistry *ba
static GList*
gtk_hotkey_key_file_registry_real_get_all_hotkeys (GtkHotkeyRegistry *base)
{
- GtkHotkeyKeyFileRegistry *self;
GFile *home;
GFileEnumerator *dir;
GFileInfo *file_info;
GError *error;
GList *result = NULL;
- self = GTK_HOTKEY_KEY_FILE_REGISTRY (base);
home = get_hotkey_home ();
error = NULL;
@@ -211,14 +204,12 @@ gtk_hotkey_key_file_registry_real_store_hotkey (GtkHotkeyRegistry *base,
GtkHotkeyInfo *info,
GError **error)
{
- GtkHotkeyKeyFileRegistry *self;
GKeyFile *keyfile;
GFile *file, *home;
GError *tmp_error;
gchar *file_path, *group;
- self = GTK_HOTKEY_KEY_FILE_REGISTRY (base);
g_return_val_if_fail (GTK_HOTKEY_IS_INFO (info), FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
@@ -306,7 +297,6 @@ gtk_hotkey_key_file_registry_real_store_hotkey (GtkHotkeyRegistry *base,
if (*error)
return FALSE;
- self = GTK_HOTKEY_KEY_FILE_REGISTRY (base);
g_return_val_if_fail (GTK_HOTKEY_IS_INFO (info), FALSE);
gtk_hotkey_registry_hotkey_stored (base, info);
return TRUE;
@@ -318,7 +308,6 @@ gtk_hotkey_key_file_registry_real_delete_hotkey (GtkHotkeyRegistry *base,
const gchar *key_id,
GError **error)
{
- GtkHotkeyKeyFileRegistry *self;
GtkHotkeyInfo *info = NULL;
GFile *file;
GKeyFile *keyfile;
@@ -330,7 +319,6 @@ gtk_hotkey_key_file_registry_real_delete_hotkey (GtkHotkeyRegistry *base,
g_return_val_if_fail (key_id != NULL, FALSE);
g_return_val_if_fail (error == NULL || *error == NULL, FALSE);
- self = GTK_HOTKEY_KEY_FILE_REGISTRY (base);
group = NULL;
file = get_hotkey_file (app_id);
@@ -455,15 +443,12 @@ gtk_hotkey_key_file_registry_real_has_hotkey (GtkHotkeyRegistry *base,
const gchar *app_id,
const gchar *key_id)
{
- GtkHotkeyKeyFileRegistry *self;
GFile *file;
gboolean exists;
g_return_val_if_fail (app_id != NULL, FALSE);
g_return_val_if_fail (key_id != NULL, FALSE);
- self = GTK_HOTKEY_KEY_FILE_REGISTRY (base);
-
file = get_hotkey_file (app_id);
g_return_val_if_fail (G_IS_FILE(file), FALSE);
commit f6ff237a84a3cd6cd12430ceed96294b28895137
Author: Ricardo Mones <ricardo at mones.org>
Date: Sun Nov 17 19:15:21 2013 +0100
Clean mailmbox plugin warnings
Cleans:
• plugin_gtk.c:312:9: warning: variable 'old_path' set but not used
• plugin_gtk.c:397:9: warning: variable 'old_path' set but not used
• mailimf_write.c:636:16: warning: variable 'next_word' set but not used
• mailimf_write.c:635:16: warning: variable 'word_end' set but not used
• mailmbox.c:519:10: warning: variable 'fixed_size' set but not used
• mailmbox.c:610:10: warning: variable 'maxuid' set but not used
• mailmbox_folder.c:162:36: warning: assignment from incompatible pointer type
• mailmbox_folder.c:872:5: warning: 'r' may be used uninitialized in this function
diff --git a/src/plugins/mailmbox/mailimf_write.c b/src/plugins/mailmbox/mailimf_write.c
index 2935f7f..c592e8f 100644
--- a/src/plugins/mailmbox/mailimf_write.c
+++ b/src/plugins/mailmbox/mailimf_write.c
@@ -632,16 +632,12 @@ int mailimf_header_string_write(FILE * f, int * col,
int state;
const char * p;
const char * word_begin;
- const char * word_end;
- const char * next_word;
int first;
state = STATE_BEGIN;
p = str;
word_begin = p;
- word_end = p;
- next_word = p;
first = 1;
while (length > 0) {
diff --git a/src/plugins/mailmbox/mailmbox.c b/src/plugins/mailmbox/mailmbox.c
index 7cb25fd..b6265e9 100644
--- a/src/plugins/mailmbox/mailmbox.c
+++ b/src/plugins/mailmbox/mailmbox.c
@@ -516,7 +516,6 @@ static char * write_fixed_message(char * str,
const char * message, size_t size,
uint32_t uid, int force_no_uid)
{
- size_t fixed_size;
size_t cur_token;
size_t left;
int end;
@@ -526,8 +525,6 @@ static char * write_fixed_message(char * str,
cur_token = 0;
- fixed_size = 0;
-
/* headers */
end = FALSE;
@@ -607,7 +604,6 @@ claws_mailmbox_append_message_list_no_lock(struct claws_mailmbox_folder * folder
char * str;
unsigned int i;
size_t from_size;
- size_t maxuid;
size_t left;
size_t crlf_count;
@@ -621,8 +617,6 @@ claws_mailmbox_append_message_list_no_lock(struct claws_mailmbox_folder * folder
if (localtime_r(&date, &time_info) != NULL)
from_size = strftime(from_line, MAX_FROM_LINE_SIZE, "From - %c\n", &time_info);
- maxuid = /* */ folder->mb_max_uid;
-
extra_size = 0;
for(i = 0 ; i < carray_count(append_tab) ; i ++) {
struct claws_mailmbox_append_info * info;
diff --git a/src/plugins/mailmbox/mailmbox_folder.c b/src/plugins/mailmbox/mailmbox_folder.c
index 8e6c123..5197ab5 100644
--- a/src/plugins/mailmbox/mailmbox_folder.c
+++ b/src/plugins/mailmbox/mailmbox_folder.c
@@ -94,7 +94,7 @@ static gint claws_mailmbox_copy_msgs(Folder *folder, FolderItem *dest,
MsgInfoList *msglist, GHashTable *relation);
static gint claws_mailmbox_remove_msg(Folder *folder, FolderItem *item, gint num);
-static gint claws_mailmbox_remove_msgs( Folder *folder, FolderItem *item, MsgInfoList *msglist, GRelation *relation );
+static gint claws_mailmbox_remove_msgs( Folder *folder, FolderItem *item, MsgInfoList *msglist, GHashTable *relation );
static gint claws_mailmbox_remove_all_msg(Folder *folder, FolderItem *item);
static FolderItem *claws_mailmbox_create_folder(Folder *folder, FolderItem *parent,
@@ -824,7 +824,7 @@ static gint claws_mailmbox_remove_msg(Folder *folder, FolderItem *item, gint num
static gint
claws_mailmbox_remove_msgs( Folder *folder, FolderItem *item,
- MsgInfoList *msglist, GRelation *relation )
+ MsgInfoList *msglist, GHashTable *relation )
{
struct claws_mailmbox_folder *mbox;
int r;
@@ -863,7 +863,7 @@ claws_mailmbox_remove_msgs( Folder *folder, FolderItem *item,
/* Fix for bug 1434
*/
- claws_mailmbox_expunge(mbox);
+ r = claws_mailmbox_expunge(mbox);
if (total > 100) {
statusbar_progress_all(0,0,0);
statusbar_pop_all();
diff --git a/src/plugins/mailmbox/plugin_gtk.c b/src/plugins/mailmbox/plugin_gtk.c
index 3c7803c..9f0e4b8 100644
--- a/src/plugins/mailmbox/plugin_gtk.c
+++ b/src/plugins/mailmbox/plugin_gtk.c
@@ -309,7 +309,6 @@ static void delete_folder_cb(GtkAction *action, gpointer data)
FolderItem *item;
gchar *message, *name;
AlertValue avalue;
- gchar *old_path;
gchar *old_id;
item = folderview_get_selected_item(folderview);
@@ -328,7 +327,6 @@ static void delete_folder_cb(GtkAction *action, gpointer data)
g_free(message);
if (avalue != G_ALERTALTERNATE) return;
- Xstrdup_a(old_path, item->path, return);
old_id = folder_item_get_identifier(item);
if (folderview->opened == folderview->selected ||
@@ -394,7 +392,6 @@ static void rename_folder_cb(GtkAction *action, gpointer data)
gchar *new_folder;
gchar *name;
gchar *message;
- gchar *old_path;
gchar *old_id;
gchar *new_id;
gchar *p;
@@ -430,8 +427,6 @@ static void rename_folder_cb(GtkAction *action, gpointer data)
return;
}
- Xstrdup_a(old_path, item->path, {g_free(new_folder); return;});
-
old_id = folder_item_get_identifier(item);
if (folder_item_rename(item, new_folder) < 0) {
commit a35fa2bcb535d69a2517314f8f3c3231ca4b4038
Author: Ricardo Mones <ricardo at mones.org>
Date: Sun Nov 17 18:23:52 2013 +0100
Clean clamd plugin warning
Cleans: ‘clamd-plugin.c:494:30: warning: argument to 'sizeof' in 'memset'
call is the same pointer type 'struct response *' as the destination;
expected 'response' or an explicit length’ (gcc 4.8)
diff --git a/src/plugins/clamd/libclamd/clamd-plugin.c b/src/plugins/clamd/libclamd/clamd-plugin.c
index 63f8d1e..09e241c 100644
--- a/src/plugins/clamd/libclamd/clamd-plugin.c
+++ b/src/plugins/clamd/libclamd/clamd-plugin.c
@@ -490,8 +490,8 @@ Clamd_Stat clamd_verify_email(const gchar* path, response* result) {
/*debug_set_mode(TRUE);*/
if (!result) {
- result = malloc(sizeof(response *));
- memset(result, '\0', sizeof(response *));
+ result = malloc(sizeof(response));
+ memset(result, '\0', sizeof(response));
}
create_socket();
if (sock < 0) {
commit 8120aa01a5e0c8e7c7922c3a088772781f93ad5a
Author: Ricardo Mones <ricardo at mones.org>
Date: Sat Nov 16 21:10:11 2013 +0100
Clean ‘perl_plugin.c:993:8: warning: unused variable 'tag_id'’
diff --git a/src/plugins/perl/perl_plugin.c b/src/plugins/perl/perl_plugin.c
index 0c34590..d5729d6 100644
--- a/src/plugins/perl/perl_plugin.c
+++ b/src/plugins/perl/perl_plugin.c
@@ -990,7 +990,6 @@ static XS(XS_ClawsMail_clear_tags)
static XS(XS_ClawsMail_make_sure_tag_exists)
{
gchar *tag_str;
- gint tag_id;
dXSARGS;
if(items != 1) {
commit 6b8fa181634ff157965ff6f109c174644143316a
Author: Ricardo Mones <ricardo at mones.org>
Date: Sat Nov 16 20:32:12 2013 +0100
Clean all ‘… warning: "_POSIX_C_SOURCE" redefined’
According documentation¹: “Since Python may define some pre-processor
definitions which affect the standard headers on some systems, you must
include Python.h before any standard headers are included.”
¹http://docs.python.org/2/c-api/intro.html#includes
diff --git a/src/plugins/python/accounttype.h b/src/plugins/python/accounttype.h
index 808faba..cf5da0a 100644
--- a/src/plugins/python/accounttype.h
+++ b/src/plugins/python/accounttype.h
@@ -18,8 +18,8 @@
#ifndef ACCOUNTTYPE_H
#define ACCOUNTTYPE_H
-#include <glib.h>
#include <Python.h>
+#include <glib.h>
#include "account.h"
diff --git a/src/plugins/python/composewindowtype.c b/src/plugins/python/composewindowtype.c
index bf5b0a6..65ba864 100644
--- a/src/plugins/python/composewindowtype.c
+++ b/src/plugins/python/composewindowtype.c
@@ -20,9 +20,6 @@
# include "claws-features.h"
#endif
-#include <glib.h>
-#include <glib/gi18n.h>
-
#include "composewindowtype.h"
#include "accounttype.h"
@@ -34,6 +31,9 @@
#include "account.h"
#include "summaryview.h"
+#include <glib.h>
+#include <glib/gi18n.h>
+
#include <structmember.h>
#include <string.h>
diff --git a/src/plugins/python/composewindowtype.h b/src/plugins/python/composewindowtype.h
index 9de8546..14ddc26 100644
--- a/src/plugins/python/composewindowtype.h
+++ b/src/plugins/python/composewindowtype.h
@@ -18,8 +18,8 @@
#ifndef COMPOSEWINDOWTYPE_H
#define COMPOSEWINDOWTYPE_H
-#include <glib.h>
#include <Python.h>
+#include <glib.h>
#include "compose.h"
diff --git a/src/plugins/python/folderpropertiestype.h b/src/plugins/python/folderpropertiestype.h
index 3330c3d..752f082 100644
--- a/src/plugins/python/folderpropertiestype.h
+++ b/src/plugins/python/folderpropertiestype.h
@@ -18,8 +18,8 @@
#ifndef FOLDERPROPERTIESTYPE_H
#define FOLDERPROPERTIESTYPE_H
-#include <glib.h>
#include <Python.h>
+#include <glib.h>
#include "folder_item_prefs.h"
diff --git a/src/plugins/python/foldertype.c b/src/plugins/python/foldertype.c
index b59b1a4..c11c701 100644
--- a/src/plugins/python/foldertype.c
+++ b/src/plugins/python/foldertype.c
@@ -20,13 +20,13 @@
#include "claws-features.h"
#endif
-#include <glib/gi18n.h>
-
#include "foldertype.h"
#include "folderpropertiestype.h"
#include "messageinfotype.h"
#include "mailboxtype.h"
+#include <glib/gi18n.h>
+
#include <structmember.h>
diff --git a/src/plugins/python/foldertype.h b/src/plugins/python/foldertype.h
index d85d483..aa27a5a 100644
--- a/src/plugins/python/foldertype.h
+++ b/src/plugins/python/foldertype.h
@@ -18,8 +18,8 @@
#ifndef FOLDERTYPE_H
#define FOLDERTYPE_H
-#include <glib.h>
#include <Python.h>
+#include <glib.h>
#include "folder.h"
diff --git a/src/plugins/python/mailboxtype.c b/src/plugins/python/mailboxtype.c
index f0fa4f0..a7493ca 100644
--- a/src/plugins/python/mailboxtype.c
+++ b/src/plugins/python/mailboxtype.c
@@ -20,11 +20,11 @@
# include "claws-features.h"
#endif
+#include "mailboxtype.h"
+
#include <glib.h>
#include <glib/gi18n.h>
-#include "mailboxtype.h"
-
#include <structmember.h>
typedef struct {
diff --git a/src/plugins/python/mailboxtype.h b/src/plugins/python/mailboxtype.h
index 4640a60..58c49d6 100644
--- a/src/plugins/python/mailboxtype.h
+++ b/src/plugins/python/mailboxtype.h
@@ -18,8 +18,8 @@
#ifndef MAILBOXTYPE_H
#define MAILBOXTYPE_H
-#include <glib.h>
#include <Python.h>
+#include <glib.h>
#include "folder.h"
diff --git a/src/plugins/python/messageinfotype.c b/src/plugins/python/messageinfotype.c
index 2cf6ed0..3393c8a 100644
--- a/src/plugins/python/messageinfotype.c
+++ b/src/plugins/python/messageinfotype.c
@@ -20,8 +20,6 @@
#include "claws-features.h"
#endif
-#include <glib/gi18n.h>
-
#include "messageinfotype.h"
#include "common/tags.h"
@@ -30,6 +28,8 @@
#include "summaryview.h"
#include "procheader.h"
+#include <glib/gi18n.h>
+
#include <structmember.h>
#include <string.h>
diff --git a/src/plugins/python/messageinfotype.h b/src/plugins/python/messageinfotype.h
index df3c217..301275a 100644
--- a/src/plugins/python/messageinfotype.h
+++ b/src/plugins/python/messageinfotype.h
@@ -18,8 +18,8 @@
#ifndef MESSAGEINFOTYPE_H
#define MESSAGEINFOTYPE_H
-#include <glib.h>
#include <Python.h>
+#include <glib.h>
#include "procmsg.h"
diff --git a/src/plugins/python/nodetype.c b/src/plugins/python/nodetype.c
index 60425f8..70f4978 100644
--- a/src/plugins/python/nodetype.c
+++ b/src/plugins/python/nodetype.c
@@ -20,10 +20,10 @@
#include "claws-features.h"
#endif
-#include <glib/gi18n.h>
-
#include "nodetype.h"
+#include <glib/gi18n.h>
+
#include <structmember.h>
/* returns true on success, false if an exception was thrown */
diff --git a/src/plugins/python/nodetype.h b/src/plugins/python/nodetype.h
index 03daa31..735ef58 100644
--- a/src/plugins/python/nodetype.h
+++ b/src/plugins/python/nodetype.h
@@ -18,10 +18,8 @@
#ifndef NODETYPE_H
#define NODETYPE_H
-#include <glib.h>
-
#include <Python.h>
-
+#include <glib.h>
gboolean cmpy_add_node(PyObject *module);
diff --git a/src/plugins/python/python-hooks.c b/src/plugins/python/python-hooks.c
index f022890..fd7ba60 100644
--- a/src/plugins/python/python-hooks.c
+++ b/src/plugins/python/python-hooks.c
@@ -25,15 +25,15 @@
#include "claws-features.h"
#endif
-#include <glib.h>
-#include <glib/gi18n.h>
-
#ifdef ENABLE_PYTHON
#include <Python.h>
#include <pygobject.h>
#include <pygtk/pygtk.h>
#endif // ENABLE_PYTHON
+#include <glib.h>
+#include <glib/gi18n.h>
+
#include <dlfcn.h>
#include <signal.h>
diff --git a/src/plugins/python/python_plugin.c b/src/plugins/python/python_plugin.c
index 6b49860..ada776a 100644
--- a/src/plugins/python/python_plugin.c
+++ b/src/plugins/python/python_plugin.c
@@ -20,11 +20,11 @@
#include "claws-features.h"
#endif
+#include <Python.h>
+
#include <glib.h>
#include <glib/gi18n.h>
-#include <Python.h>
-
#include <errno.h>
#include "common/hooks.h"
commit aa1049c6aea50094b53971a2730b8f6f9f533f3a
Author: Ricardo Mones <ricardo at mones.org>
Date: Sat Nov 16 19:39:54 2013 +0100
Clean spam_report warnings
Cleans:
• spam_report.c:196:11: warning: variable 'res' set but not used
• spam_report.c:361:15: warning: variable 'summaryview' set but not used
diff --git a/src/plugins/spam_report/spam_report.c b/src/plugins/spam_report/spam_report.c
index 93e011d..aa3df22 100644
--- a/src/plugins/spam_report/spam_report.c
+++ b/src/plugins/spam_report/spam_report.c
@@ -193,7 +193,6 @@ static void report_spam(gint id, ReportInterface *intf, MsgInfo *msginfo, gchar
gchar *reqbody = NULL, *tmp = NULL, *auth = NULL, *b64 = NULL, *geturl = NULL;
size_t len_contents;
CURL *curl;
- CURLcode res;
long response;
struct CurlReadWrite chunk;
@@ -231,7 +230,7 @@ static void report_spam(gint id, ReportInterface *intf, MsgInfo *msginfo, gchar
curl_easy_setopt(curl, CURLOPT_TIMEOUT, prefs_common_get_prefs()->io_timeout_secs);
curl_easy_setopt(curl, CURLOPT_USERAGENT,
SPAM_REPORT_USERAGENT "(" PLUGINS_URI ")");
- res = curl_easy_perform(curl);
+ curl_easy_perform(curl);
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
curl_easy_cleanup(curl);
spamreport_http_response_log(intf->url, response);
@@ -253,7 +252,7 @@ static void report_spam(gint id, ReportInterface *intf, MsgInfo *msginfo, gchar
SPAM_REPORT_USERAGENT "(" PLUGINS_URI ")");
curl_easy_setopt(curl, CURLOPT_WRITEFUNCTION, curl_writefunction_cb);
curl_easy_setopt(curl, CURLOPT_WRITEDATA, (void *)&chunk);
- res = curl_easy_perform(curl);
+ curl_easy_perform(curl);
curl_easy_getinfo(curl, CURLINFO_RESPONSE_CODE, &response);
curl_easy_cleanup(curl);
spamreport_http_response_log(geturl, response);
@@ -358,12 +357,10 @@ gint plugin_init(gchar **error)
gboolean plugin_done(void)
{
MainWindow *mainwin = mainwindow_get_mainwindow();
- SummaryView *summaryview = NULL;
if (mainwin == NULL)
return TRUE;
- summaryview = mainwin->summaryview;
MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, "Message/ReportSpam", main_menu_id);
main_menu_id = 0;
commit 1b6c97420720160a6373cff94801d85e8729ed52
Author: Ricardo Mones <ricardo at mones.org>
Date: Sat Nov 16 19:23:04 2013 +0100
Clean ytnef.c warnings
Cleans:
• ytnef.c:505:13: warning: format '%i' expects argument of type 'int', but argument 2 has type 'long int'
• ytnef.c:506:13: warning: format '%i' expects argument of type 'int', but argument 2 has type 'long int'
• ytnef.c:511:13: warning: format '%i' expects argument of type 'int', but argument 2 has type 'long int'
• ytnef.c:512:13: warning: format '%i' expects argument of type 'int', but argument 2 has type 'long int'
• ytnef.c:375:9: warning: variable 'offset' set but not used
• ytnef.c:1185:52: warning: variable 'crc32' set but not used
• ytnef.c:1185:27: warning: variable 'uncompressedSize' set but not used
• ytnef.c:1185:11: warning: variable 'compressedSize' set but not used
• ytnef.c:1360:52: warning: variable 'crc32' set but not used
diff --git a/src/plugins/tnef_parse/ytnef.c b/src/plugins/tnef_parse/ytnef.c
index a30a0af..f78544f 100644
--- a/src/plugins/tnef_parse/ytnef.c
+++ b/src/plugins/tnef_parse/ytnef.c
@@ -372,7 +372,6 @@ void TNEFFillMapi(TNEFStruct *TNEF, BYTE *data, DWORD size, MAPIProps *p) {
DWORD temp_dword;
DDWORD temp_ddword;
int count=-1;
- int offset;
d = data;
p->count = SwapDWord(data);
@@ -458,7 +457,6 @@ void TNEFFillMapi(TNEFStruct *TNEF, BYTE *data, DWORD size, MAPIProps *p) {
// Make sure to read in a multiple of 4
num = vl->size;
- offset = ((num % 4) ? (4 - num%4) : 0);
d += num + ((num % 4) ? (4 - num%4) : 0);
break;
@@ -502,14 +500,14 @@ void TNEFFillMapi(TNEFStruct *TNEF, BYTE *data, DWORD size, MAPIProps *p) {
if ((d-data) < size) {
if (TNEF->Debug >= 1) {
printf("ERROR DURING MAPI READ\n");
- printf("Read %i bytes, Expected %i bytes\n", (d-data), size);
- printf("%i bytes missing\n", size - (d-data));
+ printf("Read %ld bytes, Expected %u bytes\n", (d-data), size);
+ printf("%ld bytes missing\n", size - (d-data));
}
} else if ((d-data) > size){
if (TNEF->Debug >= 1) {
printf("ERROR DURING MAPI READ\n");
- printf("Read %i bytes, Expected %i bytes\n", (d-data), size);
- printf("%i bytes extra\n", (d-data)-size);
+ printf("Read %ld bytes, Expected %u bytes\n", (d-data), size);
+ printf("%ld bytes extra\n", (d-data)-size);
}
}
return;
@@ -1180,6 +1178,7 @@ int MAPISysTimetoDTR(BYTE *data, dtr *thedate)
}
int IsCompressedRTF(variableLength *p) {
+/*
unsigned int in;
unsigned char *src;
ULONG compressedSize, uncompressedSize, magic, crc32;
@@ -1203,6 +1202,14 @@ int IsCompressedRTF(variableLength *p) {
} else {
return 0;
}
+*/
+ unsigned char *src = p->data;
+ ULONG magic = SwapDWord(src + 8);
+
+ if (magic == 0x414c454d || magic == 0x75465a4c)
+ return 1;
+
+ return 0;
}
void MAPIPrint(MAPIProps *p)
@@ -1357,7 +1364,7 @@ unsigned char *DecompressRTF(variableLength *p, int *size) {
unsigned int in;
unsigned int out;
variableLength comp_Prebuf;
- ULONG compressedSize, uncompressedSize, magic, crc32;
+ ULONG compressedSize, uncompressedSize, magic; // , crc32;
comp_Prebuf.size = strlen(RTF_PREBUF);
comp_Prebuf.data = calloc(comp_Prebuf.size + 1, 1);
@@ -1372,7 +1379,7 @@ unsigned char *DecompressRTF(variableLength *p, int *size) {
in += 4;
magic = SwapDWord(src+in);
in += 4;
- crc32 = SwapDWord(src+in);
+ // crc32 = SwapDWord(src+in);
in += 4;
// check size excluding the size field itself
commit ec43d63eb0f4f0eefe55c114f7317e50148b83b4
Author: Ricardo Mones <ricardo at mones.org>
Date: Sat Nov 16 17:59:48 2013 +0100
Clean ‘geolocation_plugin.c:260:23: warning: initialization discards 'const' qualifier from pointer target type’
diff --git a/src/plugins/geolocation/geolocation_plugin.c b/src/plugins/geolocation/geolocation_plugin.c
index 0860fc3..c70d5b9 100644
--- a/src/plugins/geolocation/geolocation_plugin.c
+++ b/src/plugins/geolocation/geolocation_plugin.c
@@ -257,7 +257,7 @@ static const gchar* get_country_from_ip(const gchar *ip)
g_free(uri);
if(soup_address_resolve_sync(addr, NULL) == SOUP_STATUS_OK) {
- gchar *physical = soup_address_get_physical(addr);
+ const gchar *physical = soup_address_get_physical(addr);
val = g_hash_table_lookup(iso_country_hash, physical);
}
commit a984e6a8825f7c4b70a2a88e24ace4c549e49186
Author: Ricardo Mones <ricardo at mones.org>
Date: Sat Nov 16 16:15:19 2013 +0100
Clean fancy warnings
Cleans:
• fancy_viewer.c:441:3: warning: format '%d' expects argument of
type 'int', but argument 2 has type 'size_t'
• fancy_prefs.c:164:9: warning: passing argument 1 of 'gtk_list_store_set'
from incompatible pointer type
• fancy_prefs.c:167:9: warning: passing argument 1 of 'gtk_list_store_set'
from incompatible pointer type
diff --git a/src/plugins/fancy/fancy_prefs.c b/src/plugins/fancy/fancy_prefs.c
index 43ea2ea..372cbaf 100644
--- a/src/plugins/fancy/fancy_prefs.c
+++ b/src/plugins/fancy/fancy_prefs.c
@@ -160,10 +160,10 @@ static void remote_content_set_labels_cb(GtkWidget *button, FancyPrefsPage *pref
model = gtk_combo_box_get_model(GTK_COMBO_BOX(prefs_page->open_external));
if (gtk_tree_model_get_iter_first (model, &iter)) {
if (remote_enabled)
- gtk_list_store_set(model, &iter, COMBOBOX_TEXT,
+ gtk_list_store_set(GTK_LIST_STORE(model), &iter, COMBOBOX_TEXT,
_("Open in viewer (remote content is enabled)"), -1);
else
- gtk_list_store_set(model, &iter, COMBOBOX_TEXT,
+ gtk_list_store_set(GTK_LIST_STORE(model), &iter, COMBOBOX_TEXT,
_("Do nothing (remote content is disabled)"), -1);
}
diff --git a/src/plugins/fancy/fancy_viewer.c b/src/plugins/fancy/fancy_viewer.c
index d3e81b9..834a97b 100644
--- a/src/plugins/fancy/fancy_viewer.c
+++ b/src/plugins/fancy/fancy_viewer.c
@@ -438,7 +438,7 @@ static void resource_request_starting_cb(WebKitWebView *view,
webkit_network_request_set_uri(request, "about:blank");
}
else
- debug_print("Starting request of %d %s\n", strlen(uri), uri);
+ debug_print("Starting request of %zu %s\n", strlen(uri), uri);
}
static gboolean fancy_text_search(MimeViewer *_viewer, gboolean backward,
commit 220a4478ca435cf7d86687831af1923308a65e8d
Author: Ricardo Mones <ricardo at mones.org>
Date: Sat Nov 16 16:02:45 2013 +0100
Clean att_remover warnings
Cleans:
• att_remover.c:503:16: warning: variable 'path' set but not used
• att_remover.c:534:15: warning: variable 'summaryview' set but not used
diff --git a/src/plugins/att_remover/att_remover.c b/src/plugins/att_remover/att_remover.c
index cb5a938..a60c1ef 100644
--- a/src/plugins/att_remover/att_remover.c
+++ b/src/plugins/att_remover/att_remover.c
@@ -500,7 +500,6 @@ static guint main_menu_id = 0;
gint plugin_init(gchar **error)
{
MainWindow *mainwin = mainwindow_get_mainwindow();
- static gchar *path[3];
gchar *rcpath;
if( !check_plugin_version(MAKE_NUMERIC_VERSION(3,6,1,27),
@@ -516,10 +515,6 @@ gint plugin_init(gchar **error)
"Message/RemoveAtt", GTK_UI_MANAGER_MENUITEM,
context_menu_id)
- path[0] = _("Plugins");
- path[1] = "AttRemover";
- path[2] = NULL;
-
prefs_set_default(prefs);
rcpath = g_strconcat(get_rc_dir(), G_DIR_SEPARATOR_S, COMMON_RC, NULL);
prefs_read_config(prefs, PREFS_BLOCK_NAME, rcpath, NULL);
@@ -531,7 +526,6 @@ gint plugin_init(gchar **error)
gboolean plugin_done(void)
{
MainWindow *mainwin = mainwindow_get_mainwindow();
- SummaryView *summaryview = NULL;
PrefFile *pref_file;
gchar *rc_file_path;
@@ -558,8 +552,6 @@ gboolean plugin_done(void)
if (mainwin == NULL)
return TRUE;
- summaryview = mainwin->summaryview;
-
MENUITEM_REMUI_MANAGER(mainwin->ui_manager,mainwin->action_group, "Message/RemoveAtt", main_menu_id);
main_menu_id = 0;
commit 4e2a78fd7d642785fd74ae45ca15a8544bb8b743
Author: Ricardo Mones <ricardo at mones.org>
Date: Fri Nov 15 23:51:56 2013 +0100
Clean address_keeper const-ness warnings
Cleans:
• address_keeper.c:103:16: warning: assignment discards
'const' qualifier from pointer target type
• address_keeper_prefs.c:239:38: warning: assignment discards
'const' qualifier from pointer target type
diff --git a/src/plugins/address_keeper/address_keeper.c b/src/plugins/address_keeper/address_keeper.c
index c742f94..aa6866a 100644
--- a/src/plugins/address_keeper/address_keeper.c
+++ b/src/plugins/address_keeper/address_keeper.c
@@ -95,7 +95,7 @@ gchar *get_comment_from_addr(const gchar *addr)
*
* @return TRUE if given address matches any of the patterns, FALSE otherwise.
*/
-gboolean matches_blocked_address(const gchar *addr, MatcherList *blocked)
+gboolean matches_blocked_address(gchar *addr, MatcherList *blocked)
{
if (blocked != NULL) {
MsgInfo info;
diff --git a/src/plugins/address_keeper/address_keeper_prefs.c b/src/plugins/address_keeper/address_keeper_prefs.c
index 3ecf7f5..a03b016 100644
--- a/src/plugins/address_keeper/address_keeper_prefs.c
+++ b/src/plugins/address_keeper/address_keeper_prefs.c
@@ -236,7 +236,7 @@ static void addkeeper_prefs_save_func(PrefsPage * _page)
addkeeper_save_config();
g_free(addkeeperprefs.block_matching_addrs);
- addkeeperprefs.block_matching_addrs = text;
+ addkeeperprefs.block_matching_addrs = (gchar *)text;
}
void address_keeper_prefs_init(void)
commit 71537057d4c44ca2f450546db67fe7d9efb3e1cd
Author: Ricardo Mones <ricardo at mones.org>
Date: Fri Nov 15 22:39:54 2013 +0100
Clean args const-ness in cm_menu_set_sensitive_full
Cleans:
• mainwindow.c:3227:3: warning: passing argument 2 of
‘cm_menu_set_sensitive_full’ discards ‘const’ qualifier
from pointer target type
• summaryview.c:1796:3: warning: passing argument 2 of
‘cm_menu_set_sensitive_full’ discards ‘const’ qualifier
from pointer target type
diff --git a/src/gtk/menu.c b/src/gtk/menu.c
index bd1c61a..81ddec9 100644
--- a/src/gtk/menu.c
+++ b/src/gtk/menu.c
@@ -81,7 +81,7 @@ void cm_toggle_menu_set_active(gchar *menu, gboolean active)
g_free(path);
}
-void cm_menu_set_sensitive_full(GtkUIManager *gui_manager, gchar *menu, gboolean sensitive)
+void cm_menu_set_sensitive_full(GtkUIManager *gui_manager, const gchar *menu, gboolean sensitive)
{
GtkWidget *widget;
gchar *path = g_strdup_printf("/%s/", menu);
diff --git a/src/gtk/menu.h b/src/gtk/menu.h
index d4204f8..7e4b0da 100644
--- a/src/gtk/menu.h
+++ b/src/gtk/menu.h
@@ -91,7 +91,7 @@ GtkActionGroup *cm_menu_create_action_group_full(GtkUIManager *ui_manager,
gint num_entries, gpointer data);
void cm_menu_set_sensitive(gchar *menu, gboolean sensitive);
void cm_toggle_menu_set_active(gchar *menu, gboolean active);
-void cm_menu_set_sensitive_full(GtkUIManager *gui_manager, gchar *menu, gboolean sensitive);
+void cm_menu_set_sensitive_full(GtkUIManager *gui_manager, const gchar *menu, gboolean sensitive);
void cm_toggle_menu_set_active_full(GtkUIManager *gui_manager, gchar *menu, gboolean active);
gchar *cm_menu_item_get_shortcut(GtkUIManager *gui_manager, gchar *menu);
GtkWidget *cm_menu_item_new_label_from_url(gchar *label);
commit 558d73fc9cc63ddd68619c9bc997532b54662a99
Author: Ricardo Mones <ricardo at mones.org>
Date: Fri Nov 15 22:27:29 2013 +0100
Clean ‘account.c:1866:2: warning: comparison between pointer and integer’
diff --git a/src/account.c b/src/account.c
index 3a898da..2d70e6d 100644
--- a/src/account.c
+++ b/src/account.c
@@ -1863,7 +1863,7 @@ gboolean password_get(const gchar *user,
cm_return_val_if_fail(user != NULL, FALSE);
cm_return_val_if_fail(server != NULL, FALSE);
cm_return_val_if_fail(protocol != NULL, FALSE);
- cm_return_val_if_fail(port != NULL, FALSE);
+ cm_return_val_if_fail(port != 0, FALSE);
req.user = user;
req.server = server;
-----------------------------------------------------------------------
Summary of changes:
src/account.c | 2 +-
src/gtk/menu.c | 2 +-
src/gtk/menu.h | 2 +-
src/plugins/address_keeper/address_keeper.c | 2 +-
src/plugins/address_keeper/address_keeper_prefs.c | 2 +-
src/plugins/att_remover/att_remover.c | 8 -------
src/plugins/clamd/libclamd/clamd-plugin.c | 4 +-
src/plugins/fancy/fancy_prefs.c | 4 +-
src/plugins/fancy/fancy_viewer.c | 2 +-
src/plugins/geolocation/geolocation_plugin.c | 2 +-
src/plugins/mailmbox/mailimf_write.c | 4 ---
src/plugins/mailmbox/mailmbox.c | 6 -----
src/plugins/mailmbox/mailmbox_folder.c | 6 ++--
src/plugins/mailmbox/plugin_gtk.c | 5 ----
.../gtkhotkey/gtk-hotkey-key-file-registry.c | 15 -------------
src/plugins/perl/perl_plugin.c | 1 -
src/plugins/python/accounttype.h | 2 +-
src/plugins/python/composewindowtype.c | 6 ++--
src/plugins/python/composewindowtype.h | 2 +-
src/plugins/python/folderpropertiestype.h | 2 +-
src/plugins/python/foldertype.c | 4 +-
src/plugins/python/foldertype.h | 2 +-
src/plugins/python/mailboxtype.c | 4 +-
src/plugins/python/mailboxtype.h | 2 +-
src/plugins/python/messageinfotype.c | 4 +-
src/plugins/python/messageinfotype.h | 2 +-
src/plugins/python/nodetype.c | 4 +-
src/plugins/python/nodetype.h | 4 +--
src/plugins/python/python-hooks.c | 6 ++--
src/plugins/python/python_plugin.c | 4 +-
src/plugins/spam_report/spam_report.c | 7 +----
src/plugins/tnef_parse/ytnef.c | 23 +++++++++++++-------
32 files changed, 54 insertions(+), 91 deletions(-)
hooks/post-receive
--
Claws Mail
More information about the Commits
mailing list