Clean mailmbox plugin warnings
authorRicardo Mones <ricardo@mones.org>
Sun, 17 Nov 2013 18:15:21 +0000 (19:15 +0100)
committerRicardo Mones <ricardo@mones.org>
Sun, 17 Nov 2013 18:53:32 +0000 (19:53 +0100)
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

src/plugins/mailmbox/mailimf_write.c
src/plugins/mailmbox/mailmbox.c
src/plugins/mailmbox/mailmbox_folder.c
src/plugins/mailmbox/plugin_gtk.c

index 2935f7fc198e5661ae5a844621ec13c717e03617..c592e8f3482b58e40c7b254a0b20316611e2f1cf 100644 (file)
@@ -632,16 +632,12 @@ int mailimf_header_string_write(FILE * f, int * col,
   int state;
   const char * p;
   const char * word_begin;
   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;
   int first;
   
   state = STATE_BEGIN;
   
   p = str;
   word_begin = p;
-  word_end = p;
-  next_word = p;
   first = 1;
   
   while (length > 0) {
   first = 1;
   
   while (length > 0) {
index 7cb25fda4e31a2036126266f46fb6e81ed04a20c..b6265e98f1a850cb1ceeb2034acf937ff945abf5 100644 (file)
@@ -516,7 +516,6 @@ static char * write_fixed_message(char * str,
                                  const char * message, size_t size,
                                  uint32_t uid, int force_no_uid)
 {
                                  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;
   size_t cur_token;
   size_t left;
   int end;
@@ -526,8 +525,6 @@ static char * write_fixed_message(char * str,
 
   cur_token = 0;
 
 
   cur_token = 0;
 
-  fixed_size = 0;
-
   /* headers */
 
   end = FALSE;
   /* 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;
   char * str;
   unsigned int i;
   size_t from_size;
-  size_t maxuid;
   size_t left;
   size_t crlf_count;
 
   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);
 
   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;
   extra_size = 0;
   for(i = 0 ; i < carray_count(append_tab) ; i ++) {
     struct claws_mailmbox_append_info * info;
index 8e6c1235ee68341a33dd93fdb40ca95c3b855db0..5197ab56142b874c32d15a07f49dbfe3f1e54406 100644 (file)
@@ -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);
     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,
 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,
 
 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;
 {
     struct claws_mailmbox_folder *mbox;
     int r;
@@ -863,7 +863,7 @@ claws_mailmbox_remove_msgs( Folder *folder, FolderItem *item,
 
     /* Fix for bug 1434
      */
 
     /* 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();
     if (total > 100) {
                statusbar_progress_all(0,0,0);
                statusbar_pop_all();
index 3c7803ce090677bc05dfce9f3f81dddec154b126..9f0e4b8e9203c24c9d65153aa06feafd52c46abf 100644 (file)
@@ -309,7 +309,6 @@ static void delete_folder_cb(GtkAction *action, gpointer data)
        FolderItem *item;
        gchar *message, *name;
        AlertValue avalue;
        FolderItem *item;
        gchar *message, *name;
        AlertValue avalue;
-       gchar *old_path;
        gchar *old_id;
 
        item = folderview_get_selected_item(folderview);
        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;
 
        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 ||
        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 *new_folder;
        gchar *name;
        gchar *message;
-       gchar *old_path;
        gchar *old_id;
        gchar *new_id;
        gchar *p;
        gchar *old_id;
        gchar *new_id;
        gchar *p;
@@ -430,8 +427,6 @@ static void rename_folder_cb(GtkAction *action, gpointer data)
                return;
        }
 
                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) {
        old_id = folder_item_get_identifier(item);
 
        if (folder_item_rename(item, new_folder) < 0) {