aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-09-20 02:43:17 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2007-09-20 02:43:17 +0000
commitd73e3bb581deb1e1b9645780785bc78af3796b41 (patch)
treec49441039830be24c2ef627461a9ae69dd5f9720
parentc2dbb1ce00b5ccdc7c6a3aa8d880d88658446654 (diff)
removed all warnings output with -Wall.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1910 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog27
-rw-r--r--ChangeLog.ja27
-rw-r--r--libsylph/imap.c2
-rw-r--r--libsylph/procmime.c2
-rw-r--r--libsylph/procmsg.c2
-rw-r--r--libsylph/procmsg.h4
-rw-r--r--libsylph/utils.c1
-rw-r--r--src/addrcache.c6
-rw-r--r--src/addressbook.c8
-rw-r--r--src/compose.c5
-rw-r--r--src/editbook.c2
-rw-r--r--src/gtkshruler.c2
-rw-r--r--src/importcsv.c2
-rw-r--r--src/inc.c1
-rw-r--r--src/ldif.c2
-rw-r--r--src/main.c2
-rw-r--r--src/mainwindow.c2
-rw-r--r--src/manage_window.c1
-rw-r--r--src/mimeview.c1
-rw-r--r--src/prefs_display_items.c2
-rw-r--r--src/prefs_toolbar.c4
-rw-r--r--src/printing.c4
-rw-r--r--src/rfc2015.c2
-rw-r--r--src/send_message.c1
-rw-r--r--src/summaryview.c8
-rw-r--r--src/trayicon.c2
26 files changed, 79 insertions, 43 deletions
diff --git a/ChangeLog b/ChangeLog
index faa0de34..a2239354 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,32 @@
2007-09-20
+ libsylph/utils.c
+ libsylph/procmsg.c
+ libsylph/procmsg.h
+ libsylph/procmime.c
+ libsylph/imap.c
+ src/addrcache.c
+ src/compose.c
+ src/inc.c
+ src/trayicon.c
+ src/printing.c
+ src/addressbook.c
+ src/prefs_toolbar.c
+ src/editbook.c
+ src/ldif.c
+ src/mimeview.c
+ src/importcsv.c
+ src/main.c
+ src/gtkshruler.c
+ src/send_message.c
+ src/rfc2015.c
+ src/summaryview.c
+ src/mainwindow.c
+ src/manage_window.c
+ src/prefs_display_items.c: removed all warnings outout with -Wall.
+
+2007-09-20
+
* src/prefs_common_dialog.c: fixed a bug that 'Set display item of
summary...' button' always show send folder setting.
diff --git a/ChangeLog.ja b/ChangeLog.ja
index dcb4b484..7bbb4082 100644
--- a/ChangeLog.ja
+++ b/ChangeLog.ja
@@ -1,5 +1,32 @@
2007-09-20
+ libsylph/utils.c
+ libsylph/procmsg.c
+ libsylph/procmsg.h
+ libsylph/procmime.c
+ libsylph/imap.c
+ src/addrcache.c
+ src/compose.c
+ src/inc.c
+ src/trayicon.c
+ src/printing.c
+ src/addressbook.c
+ src/prefs_toolbar.c
+ src/editbook.c
+ src/ldif.c
+ src/mimeview.c
+ src/importcsv.c
+ src/main.c
+ src/gtkshruler.c
+ src/send_message.c
+ src/rfc2015.c
+ src/summaryview.c
+ src/mainwindow.c
+ src/manage_window.c
+ src/prefs_display_items.c: -Wall で出力されるすべての警告を除去。
+
+2007-09-20
+
* src/prefs_common_dialog.c: 「サマリの表示項目を設定...」ボタンが
常に送信フォルダの設定を表示していたバグを修正。
diff --git a/libsylph/imap.c b/libsylph/imap.c
index cc33ab2a..eac178e0 100644
--- a/libsylph/imap.c
+++ b/libsylph/imap.c
@@ -1778,7 +1778,6 @@ static gint imap_scan_tree_recursive(IMAPSession *session, FolderItem *item,
GSList *item_list)
{
Folder *folder;
- IMAPFolder *imapfolder;
FolderItem *new_item;
GSList *part_list, *cur;
GNode *node;
@@ -1896,7 +1895,6 @@ static GSList *imap_get_folder_list(IMAPSession *session, FolderItem *item)
gchar *real_path;
gchar *wildcard_path;
gchar separator;
- gchar wildcard[3];
GSList *item_list;
folder = item->folder;
diff --git a/libsylph/procmime.c b/libsylph/procmime.c
index 24fa4441..b06f0d6c 100644
--- a/libsylph/procmime.c
+++ b/libsylph/procmime.c
@@ -1680,7 +1680,7 @@ EncodingType procmime_get_encoding_for_str(const gchar *str)
total_len = strlen(str);
- for (p = str; *p != '\0'; ++p) {
+ for (p = (const guchar *)str; *p != '\0'; ++p) {
if (*p & 0x80)
++octet_chars;
}
diff --git a/libsylph/procmsg.c b/libsylph/procmsg.c
index 194dd374..2f7c4e74 100644
--- a/libsylph/procmsg.c
+++ b/libsylph/procmsg.c
@@ -1570,7 +1570,7 @@ MsgInfo *procmsg_get_msginfo(FolderItem *item, gint num)
MsgInfo *msginfo;
FolderType type;
- g_return_if_fail(item->folder != NULL);
+ g_return_val_if_fail(item->folder != NULL, NULL);
msginfo = folder_item_get_msginfo(item, num);
if (!msginfo)
diff --git a/libsylph/procmsg.h b/libsylph/procmsg.h
index 8456cdc9..34a63bb0 100644
--- a/libsylph/procmsg.h
+++ b/libsylph/procmsg.h
@@ -309,6 +309,10 @@ gint procmsg_save_to_outbox (FolderItem *outbox,
void procmsg_print_message (MsgInfo *msginfo,
const gchar *cmdline,
gboolean all_headers);
+void procmsg_print_message_part (MsgInfo *msginfo,
+ MimeInfo *partinfo,
+ const gchar *cmdline,
+ gboolean all_headers);
MsgInfo *procmsg_get_msginfo (FolderItem *item,
gint num);
diff --git a/libsylph/utils.c b/libsylph/utils.c
index 879a129e..b4db125f 100644
--- a/libsylph/utils.c
+++ b/libsylph/utils.c
@@ -489,7 +489,6 @@ gboolean is_next_nonascii(const gchar *s)
gint get_next_word_len(const gchar *s)
{
const gchar *p = s;
- gint len = 0;
gboolean in_quote = FALSE;
while (*p != '\0') {
diff --git a/src/addrcache.c b/src/addrcache.c
index a28a62ba..eb8116c1 100644
--- a/src/addrcache.c
+++ b/src/addrcache.c
@@ -737,9 +737,6 @@ ItemPerson *addrcache_remove_person_id( AddressCache *cache, const gchar *uid )
obj = ( AddrItemObject * ) g_hash_table_lookup( cache->itemHash, uid );
if( obj ) {
if( ADDRITEM_TYPE(obj) == ITEMTYPE_PERSON ) {
- ItemEMail *email;
- GList *list;
-
/* Remove person's email addresses from all groups where */
/* referenced and from hash table. */
ItemPerson *person = ( ItemPerson * ) obj;
@@ -772,9 +769,6 @@ ItemPerson *addrcache_remove_person( AddressCache *cache, ItemPerson *person ) {
obj = ( AddrItemObject * ) g_hash_table_lookup( cache->itemHash, uid );
if( obj ) {
if( ADDRITEM_TYPE(obj) == ITEMTYPE_PERSON ) {
- ItemEMail *email;
- GList *list;
-
/* Remove person's email addresses from all groups where */
/* referenced and from hash table. */
ItemFolder *parent = ( ItemFolder * ) ADDRITEM_PARENT(person);
diff --git a/src/addressbook.c b/src/addressbook.c
index bee48819..ca7858c7 100644
--- a/src/addressbook.c
+++ b/src/addressbook.c
@@ -489,7 +489,6 @@ static void addressbook_create(void)
GtkWidget *clist;
GtkWidget *paned;
GtkWidget *hbox;
- GtkWidget *label;
GtkWidget *entry;
GtkWidget *statusbar;
GtkWidget *hbbox;
@@ -1376,11 +1375,6 @@ static gboolean addressbook_tree_button_pressed(GtkWidget *ctree,
{
GtkCList *clist = GTK_CLIST(ctree);
gint row, column;
- AddressObject *obj = NULL;
- /* GtkCTreeNode *node; */
- AdapterDSource *ads = NULL;
- AddressInterface *iface = NULL;
- AddressDataSource *ds = NULL;
if( ! event ) return FALSE;
/* */
@@ -1925,7 +1919,6 @@ static void addressbook_delete_address_cb(gpointer data, guint action,
static void addressbook_copy_address_cb(gpointer data, guint action,
GtkWidget *widget)
{
- GtkCTree *clist = GTK_CTREE( addrbook.clist );
AddressObject *obj;
GList *node;
@@ -1949,7 +1942,6 @@ static void addressbook_copy_address_cb(gpointer data, guint action,
static void addressbook_paste_address_cb(gpointer data, guint action,
GtkWidget *widget)
{
- GtkCTree *clist = GTK_CTREE( addrbook.clist );
GtkCTree *ctree = GTK_CTREE( addrbook.ctree );
AddressObject *obj = NULL, *pobj = NULL;
AddressDataSource *ds = NULL;
diff --git a/src/compose.c b/src/compose.c
index 116aba58..5b453336 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -1936,7 +1936,6 @@ static gchar *compose_get_signature_str(Compose *compose)
gchar *sig_path;
gchar *sig_body = NULL;
gchar *utf8_sig_body = NULL;
- gchar *sig_str = NULL;
gchar *utf8_sig_str = NULL;
g_return_val_if_fail(compose->account != NULL, NULL);
@@ -4172,8 +4171,6 @@ static gint compose_write_headers(Compose *compose, FILE *fp,
/* X-Sylpheed headers */
if (is_draft) {
- gchar *id;
-
fprintf(fp, "X-Sylpheed-Account-Id: %d\n",
compose->account->account_id);
if (compose->reply_target)
@@ -5212,7 +5209,7 @@ static GtkWidget *compose_toolbar_create_from_list(Compose *compose,
static void compose_set_toolbar_button_visibility(Compose *compose)
{
- GtkToolbarStyle style;
+ GtkToolbarStyle style = GTK_TOOLBAR_BOTH_HORIZ;
if (prefs_common.toolbar_style == TOOLBAR_NONE)
style = -1;
diff --git a/src/editbook.c b/src/editbook.c
index 865aea06..9f935bde 100644
--- a/src/editbook.c
+++ b/src/editbook.c
@@ -133,9 +133,11 @@ static void edit_book_enable_buttons( gboolean enable ) {
/* gtk_widget_set_sensitive( addrbookedit_dlg.file_btn, enable ); */
}
+#if 0
static void edit_book_name_focus( GtkWidget *widget, GdkEventFocus *event, gpointer data) {
edit_book_status_show( "" );
}
+#endif
static gchar *edit_book_guess_file( AddressBookFile *abf ) {
gchar *newFile = NULL;
diff --git a/src/gtkshruler.c b/src/gtkshruler.c
index d4a72d57..546affd0 100644
--- a/src/gtkshruler.c
+++ b/src/gtkshruler.c
@@ -127,7 +127,7 @@ gtk_shruler_set_start_pos(GtkSHRuler *ruler, gint pos)
gint
gtk_shruler_get_start_pos(GtkSHRuler *ruler)
{
- g_return_if_fail (GTK_IS_SHRULER (ruler));
+ g_return_val_if_fail (GTK_IS_SHRULER (ruler), 0);
return ruler->start_pos;
}
diff --git a/src/importcsv.c b/src/importcsv.c
index 00bb2c4c..4fb6d668 100644
--- a/src/importcsv.c
+++ b/src/importcsv.c
@@ -373,7 +373,7 @@ static gint imp_csv_import_data( gchar *csvFile, AddressCache *cache ) {
enc = conv_check_file_encoding(csvFile);
if ((fp = g_fopen(csvFile, "rb")) == NULL) {
- return;
+ return MGU_OPEN_FILE;
}
fields_len = sizeof(imp_csv_attrib) / sizeof(imp_csv_attrib[0]);
diff --git a/src/inc.c b/src/inc.c
index 2b6b18a4..0fb949c8 100644
--- a/src/inc.c
+++ b/src/inc.c
@@ -48,6 +48,7 @@
#include "pop.h"
#include "recv.h"
#include "mbox.h"
+#include "imap.h"
#include "utils.h"
#include "gtkutils.h"
#include "statusbar.h"
diff --git a/src/ldif.c b/src/ldif.c
index 21c74478..805b1a54 100644
--- a/src/ldif.c
+++ b/src/ldif.c
@@ -628,7 +628,7 @@ static gchar *ldif_conv_base64( gchar *buf ) {
gint len;
outbuf = g_malloc(strlen(buf) + 1);
- len = base64_decode(outbuf, buf, -1);
+ len = base64_decode((guchar *)outbuf, buf, -1);
outbuf[len] = '\0';
if (g_utf8_validate(outbuf, -1, NULL))
return outbuf;
diff --git a/src/main.c b/src/main.c
index 4deeeb3d..a29dd44a 100644
--- a/src/main.c
+++ b/src/main.c
@@ -177,7 +177,9 @@ int main(int argc, char *argv[])
MainWindow *mainwin;
FolderView *folderview;
GdkPixbuf *icon;
+#ifdef G_OS_WIN32
GList *iconlist = NULL;
+#endif
app_init();
parse_cmd_opt(argc, argv);
diff --git a/src/mainwindow.c b/src/mainwindow.c
index fb2698f2..490bffe1 100644
--- a/src/mainwindow.c
+++ b/src/mainwindow.c
@@ -1940,7 +1940,7 @@ void main_window_set_toolbar_sensitive(MainWindow *mainwin)
static void main_window_set_toolbar_button_visibility(MainWindow *mainwin)
{
- GtkToolbarStyle style;
+ GtkToolbarStyle style = GTK_TOOLBAR_BOTH_HORIZ;
if (prefs_common.toolbar_style == TOOLBAR_NONE)
style = -1;
diff --git a/src/manage_window.c b/src/manage_window.c
index 5b618e6f..fe9f2b86 100644
--- a/src/manage_window.c
+++ b/src/manage_window.c
@@ -23,6 +23,7 @@
#include "manage_window.h"
#include "utils.h"
+#include "gtkutils.h"
static GtkWidget *focus_window;
diff --git a/src/mimeview.c b/src/mimeview.c
index 28d20a9b..8d5045e7 100644
--- a/src/mimeview.c
+++ b/src/mimeview.c
@@ -55,6 +55,7 @@
#include "summaryview.h"
#include "menu.h"
#include "compose.h"
+#include "printing.h"
#include "filesel.h"
#include "alertpanel.h"
#include "inputdialog.h"
diff --git a/src/prefs_display_items.c b/src/prefs_display_items.c
index 66872797..b55af772 100644
--- a/src/prefs_display_items.c
+++ b/src/prefs_display_items.c
@@ -493,11 +493,9 @@ static void prefs_display_items_add(GtkWidget *widget, gpointer data)
static void prefs_display_items_remove(GtkWidget *widget, gpointer data)
{
PrefsDisplayItemsDialog *dialog = data;
- GtkCList *stock_clist = GTK_CLIST(dialog->stock_clist);
GtkCList *shown_clist = GTK_CLIST(dialog->shown_clist);
PrefsDisplayItem *item;
gint row;
- gchar *name;
if (!shown_clist->selection) return;
diff --git a/src/prefs_toolbar.c b/src/prefs_toolbar.c
index 12e5d3d8..d77dcbc6 100644
--- a/src/prefs_toolbar.c
+++ b/src/prefs_toolbar.c
@@ -25,10 +25,12 @@
#include <glib.h>
#include <glib/gi18n.h>
-#include <gtk/gtkwindow.h>
+#include <gtk/gtkmain.h>
#include <gtk/gtklabel.h>
#include <gtk/gtkstock.h>
+#include <string.h>
+
#include "prefs_toolbar.h"
#include "prefs_display_items.h"
diff --git a/src/printing.c b/src/printing.c
index 690f86bf..426ddfdb 100644
--- a/src/printing.c
+++ b/src/printing.c
@@ -170,7 +170,6 @@ static gint message_count_page(MsgPrintInfo *mpinfo, GtkPrintContext *context,
PangoFontDescription *desc;
gint layout_h;
gint lines_per_page, lines_left;
- gint body_lines = 0;
gint n_pages = 1;
PageInfo *pinfo;
gint i;
@@ -290,8 +289,6 @@ static void begin_print(GtkPrintOperation *operation, GtkPrintContext *context,
gpointer data)
{
PrintData *print_data = data;
- GSList *cur;
- MsgInfo *msginfo;
gint n_pages = 0;
gint i;
@@ -379,7 +376,6 @@ static void draw_page(GtkPrintOperation *operation, GtkPrintContext *context,
PangoLayoutIter *iter;
PangoLayoutLine *layout_line;
gint baseline;
- gint y0, y1;
gdouble x, y;
if (fgets(buf, sizeof(buf), mpinfo->fp) == NULL)
diff --git a/src/rfc2015.c b/src/rfc2015.c
index 5ca94536..7bf195ff 100644
--- a/src/rfc2015.c
+++ b/src/rfc2015.c
@@ -1881,7 +1881,7 @@ failure:
gint rfc2015_encrypt_sign_armored(const gchar *file, GSList *recp_list,
GSList *key_list)
{
- FILE *fp;
+ FILE *fp = NULL;
gchar buf[BUFFSIZE];
gint i;
gpgme_error_t err;
diff --git a/src/send_message.c b/src/send_message.c
index 93b76215..b14021da 100644
--- a/src/send_message.c
+++ b/src/send_message.c
@@ -40,6 +40,7 @@
#include "ssl.h"
#include "smtp.h"
#include "news.h"
+#include "imap.h"
#include "prefs_common.h"
#include "prefs_account.h"
#include "procheader.h"
diff --git a/src/summaryview.c b/src/summaryview.c
index f3359b96..de4ea9ae 100644
--- a/src/summaryview.c
+++ b/src/summaryview.c
@@ -767,7 +767,6 @@ gboolean summary_show(SummaryView *summaryview, FolderItem *item,
gboolean update_cache)
{
GtkTreeView *treeview = GTK_TREE_VIEW(summaryview->treeview);
- GtkTreeModel *model = GTK_TREE_MODEL(summaryview->store);
GtkTreeIter iter;
GSList *mlist;
gchar *buf;
@@ -3739,9 +3738,7 @@ void summary_save_as(SummaryView *summaryview)
void summary_print(SummaryView *summaryview)
{
- MsgInfo *msginfo;
- GSList *mlist, *cur;
- gchar *msg;
+ GSList *mlist;
gboolean all_headers;
all_headers = summaryview->messageview->textview->show_all_headers;
@@ -5415,7 +5412,7 @@ static GSList *summary_qsearch_filter(SummaryView *summaryview,
status_rule = filter_rule_new("Status filter rule", FLT_OR,
cond_list, NULL);
break;
- QS_ALL:
+ case QS_ALL:
default:
break;
}
@@ -5466,7 +5463,6 @@ static GSList *summary_qsearch_filter(SummaryView *summaryview,
void summary_qsearch(SummaryView *summaryview)
{
QSearchCondType type;
- FilterCondType ftype;
GtkWidget *menuitem;
const gchar *key;
GSList *flt_mlist;
diff --git a/src/trayicon.c b/src/trayicon.c
index fc1f1f15..b142916e 100644
--- a/src/trayicon.c
+++ b/src/trayicon.c
@@ -210,8 +210,6 @@ gboolean notify_timeout_cb(gpointer data)
void trayicon_set_notify(gboolean enabled)
{
- GdkPixbuf *pixbuf;
-
if (enabled && !on_notify) {
trayicon_set_stock_icon(TRAYICON_NEW_IMAGE);
on_notify = TRUE;