* cleanup for -Wall: unused variables removed, some return types fixed, includes...
authorArne Zellentin <arne@kernelconcepts.de>
Thu, 8 Jun 2006 15:52:55 +0000 (15:52 +0000)
committerArne Zellentin <arne@kernelconcepts.de>
Thu, 8 Jun 2006 15:52:55 +0000 (15:52 +0000)
pmo-trunk-r189

src/modest-account-mgr.c
src/modest-identity-keys.h
src/modest-identity-mgr.c
src/modest-main.c
src/modest-text-utils.c
src/modest-tny-account-store.c
src/modest-tny-folder-tree-view.c
src/modest-tny-header-tree-view.c
src/modest-tny-msg-actions.c
src/modest-tny-msg-view.c

index 3ea2ed6..e22063a 100644 (file)
@@ -130,7 +130,6 @@ modest_account_mgr_add_account (ModestAccountMgr * self, const gchar * name,
 {
        ModestAccountMgrPrivate *priv;
        gchar *key;
-       gboolean retval;
 
        g_return_val_if_fail (self, FALSE);
        g_return_val_if_fail (name, FALSE);
@@ -264,7 +263,7 @@ modest_account_mgr_remove_server_account (ModestAccountMgr * self,
                                          const gchar * name, GError ** err)
 {
        ModestAccountMgrPrivate *priv;
-       gchar *acckey, *key;
+       gchar *acckey;
        gboolean retval;
 
        g_return_val_if_fail (self, FALSE);
@@ -367,7 +366,7 @@ modest_account_mgr_server_account_names (ModestAccountMgr * self,
 GSList *
 modest_account_mgr_account_names (ModestAccountMgr * self, GError ** err)
 {
-       GSList *accounts, *cursor;
+       GSList *accounts;
        ModestAccountMgrPrivate *priv;
        const size_t prefix_len = strlen (MODEST_ACCOUNT_NAMESPACE "/");
 
index 8f1967f..19f4869 100644 (file)
@@ -12,6 +12,7 @@
 /* user identity keys */
 #define MODEST_IDENTITY_DISPLAY_NAME      "display_name"   /* string */
 #define MODEST_IDENTITY_EMAIL             "email"          /* string */
+#define MODEST_IDENTITY_EMAIL_ALTERNATIVES "email_alternatives" /* string */
 #define MODEST_IDENTITY_REPLYTO           "replyto"        /* string */
 #define MODEST_IDENTITY_SIGNATURE         "signature"      /* string */
 #define MODEST_IDENTITY_USE_SIGNATURE     "use_signature"  /* boolean */
index 7c50f22..998802e 100644 (file)
@@ -243,7 +243,7 @@ strip_prefix_from_elements (GSList * lst, guint n)
 GSList *
 modest_identity_mgr_identity_names (ModestIdentityMgr * self, GError ** err)
 {
-       GSList *identities, *cursor;
+       GSList *identities;
        ModestIdentityMgrPrivate *priv;
        const size_t prefix_len = strlen (MODEST_IDENTITY_NAMESPACE "/");
 
index 5f97692..85b9a95 100644 (file)
@@ -5,6 +5,7 @@
 #include "modest-account-mgr.h"
 #include "modest-identity-mgr.h"
 #include "modest-ui.h"
+#include "modest-icon-factory.h"
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
index ddf2476..4ea7ec7 100644 (file)
@@ -4,6 +4,7 @@
 
 #include <gtk/gtk.h>
 #include <string.h>
+#include <stdlib.h>
 
 #include "modest-text-utils.h"
 
@@ -74,7 +75,6 @@ get_indent_level (const char *l)
 static void
 unquote_line (GString * l)
 {
-       GString *r;
        gchar *p;
 
        p = l->str;
@@ -175,7 +175,7 @@ modest_text_utils_quote (const gchar * to_quote, const gchar * from,
                         const time_t sent_date, const int limit)
 {
        const gchar *iter;
-       gint indent, breakpoint, rem_indent;
+       gint indent, breakpoint, rem_indent = 0;
        gchar sent_str[101];
        GString *q, *l, *remaining;
        gsize len;
index a370f4b..dcceba2 100644 (file)
@@ -9,6 +9,7 @@
 #include <tny-store-account-iface.h>
 #include <tny-transport-account-iface.h>
 #include <tny-device-iface.h>
+#include <tny-device.h>
 #include <tny-account-store.h>
 
 #include <tny-store-account.h>
@@ -389,7 +390,6 @@ tny_accounts_from_server_accounts (ModestTnyAccountStore *self, GSList *accounts
 
        while (cursor) {
                TnyAccountIface *tny_account;
-               gchar *key = cursor->data;
                tny_account = tny_account_from_key (self, (gchar*)cursor->data,
                                                    is_store);
                if (!tny_account) {
@@ -412,7 +412,7 @@ modest_tny_account_store_get_store_accounts  (TnyAccountStoreIface *iface)
 {
        ModestTnyAccountStore        *self;
        ModestTnyAccountStorePrivate *priv;
-       GSList                       *accounts, *cursor;
+       GSList                       *accounts;
        GList                        *tny_accounts;
 
        g_return_val_if_fail (iface, NULL);
@@ -446,7 +446,7 @@ modest_tny_account_store_get_transport_accounts (TnyAccountStoreIface *iface)
 {
        ModestTnyAccountStore        *self;
        ModestTnyAccountStorePrivate *priv;
-       GSList                       *accounts, *cursor;
+       GSList                       *accounts;
        GList                        *tny_accounts;
 
        g_return_val_if_fail (iface, NULL);
@@ -517,8 +517,6 @@ modest_tny_account_store_get_cache_dir (TnyAccountStoreIface *self)
        ModestTnyAccountStorePrivate *priv;
        priv = MODEST_TNY_ACCOUNT_STORE_GET_PRIVATE(self);
 
-       gchar *cache_dir;
-
        if (!priv->cache_dir) {
                if (g_getenv("HOME") != NULL)
                        priv->cache_dir = g_strconcat(g_getenv("HOME"),
index 27fb3b8..1f1c8dc 100644 (file)
@@ -101,7 +101,6 @@ text_cell_data  (GtkTreeViewColumn *column,  GtkCellRenderer *renderer,
 {
        GObject *rendobj;
        gchar *fname;
-       gchar *type_name;
        guint unread;
        TnyMsgFolderType type;
        
@@ -211,7 +210,6 @@ modest_tny_folder_tree_view_init (ModestTnyFolderTreeView *obj)
 static void
 modest_tny_folder_tree_view_finalize (GObject *obj)
 {
-       int i;
        ModestTnyFolderTreeViewPrivate *priv;
 
        g_return_if_fail (obj);
index 09824eb..d7c56c4 100644 (file)
@@ -150,7 +150,6 @@ static void
 sender_receiver_cell_data  (GtkTreeViewColumn *column,  GtkCellRenderer *renderer,
                            GtkTreeModel *tree_model,  GtkTreeIter *iter,  gboolean is_sender)
 {
-       GObject *rendobj;
        TnyMsgHeaderFlags flags;
        gchar *addr1, *addr2;
        gint sender_receiver_col;
@@ -208,7 +207,7 @@ display_date (time_t date)
 }
 
 
-
+static void
 compact_header_cell_data  (GtkTreeViewColumn *column,  GtkCellRenderer *renderer,
                           GtkTreeModel *tree_model,  GtkTreeIter *iter,  gpointer user_data)
 {
@@ -397,7 +396,6 @@ modest_tny_header_tree_view_finalize (GObject *obj)
 {
        ModestTnyHeaderTreeView        *self;
        ModestTnyHeaderTreeViewPrivate *priv;
-       int i;
        
        self = MODEST_TNY_HEADER_TREE_VIEW(obj);
        priv = MODEST_TNY_HEADER_TREE_VIEW_GET_PRIVATE(self);
@@ -475,7 +473,6 @@ const GSList*
 modest_tny_header_tree_view_get_columns (ModestTnyHeaderTreeView *self)
 {
        ModestTnyHeaderTreeViewPrivate *priv;
-       GSList *cursor;
 
        g_return_val_if_fail (self, FALSE);
        
@@ -655,8 +652,7 @@ gboolean
 modest_tny_header_tree_view_set_folder (ModestTnyHeaderTreeView *self,
                                        TnyMsgFolderIface *folder)
 {
-       int i;
-       GtkTreeModel *oldsortable, *sortable, *oldmodel;
+       GtkTreeModel *oldsortable, *sortable;
        ModestTnyHeaderTreeViewPrivate *priv;
        
        g_return_val_if_fail (self, FALSE);
@@ -725,7 +721,6 @@ selection_changed (GtkTreeSelection *sel, gpointer user_data)
                            &header, -1);
        
        if (header) {
-               TnyMsgHeaderFlags flags;
                const TnyMsgIface *msg;
                const TnyMsgFolderIface *folder;
                
index 4adafaf..e75d188 100644 (file)
@@ -8,6 +8,7 @@
 /* TODO: put in auto* */
 #include <tny-text-buffer-stream.h>
 #include <tny-msg-mime-part-iface.h>
+#include <tny-msg-iface.h>
 
 #ifdef HAVE_CONFIG_H
 #include <config.h>
index 87898c2..c6b4e63 100644 (file)
@@ -11,6 +11,7 @@
 #include <regex.h>
 #include <ctype.h>
 #include <glib/gi18n.h>
+#include <gtkhtml/gtkhtml.h>
 
 /* 'private'/'protected' functions */
 static void     modest_tny_msg_view_class_init   (ModestTnyMsgViewClass *klass);
@@ -182,8 +183,11 @@ on_link_clicked (GtkWidget *widget, const gchar *uri,
                priv = MODEST_TNY_MSG_VIEW_GET_PRIVATE(msg_view);
                priv->show_attachments = !priv->show_attachments;
                modest_tny_msg_view_set_message(msg_view, priv->msg);
+               return TRUE;
        }
        g_message ("link clicked: %s", uri); /* FIXME */
+       return FALSE;
+       
 }
 
 
@@ -311,7 +315,7 @@ attachments_as_html(ModestTnyMsgView *self, TnyMsgIface *msg)
                filename = "";
                content_type = tny_msg_mime_part_iface_get_content_type(
                                                                                TNY_MSG_MIME_PART_IFACE(attachment->data));
-               g_return_if_fail(content_type);
+               g_return_val_if_fail(content_type, NULL);
                if (      tny_msg_mime_part_iface_content_type_is(
                                                                                TNY_MSG_MIME_PART_IFACE(attachment->data),
                                                                                "image/jpeg")
@@ -607,10 +611,8 @@ modest_tny_msg_view_get_selected_text (ModestTnyMsgView *self)
        GtkWidget *html;
        int len;
        GtkClipboard *clip;
-       gchar *text;
-       GtkTextBuffer *buf;
 
-       g_return_if_fail (self);
+       g_return_val_if_fail (self, NULL);
        priv = MODEST_TNY_MSG_VIEW_GET_PRIVATE(self);
        html = priv->gtkhtml;