Warning fixes
authorColin Leroy <colin@colino.net>
Fri, 2 May 2014 12:33:05 +0000 (14:33 +0200)
committerColin Leroy <colin@colino.net>
Fri, 2 May 2014 12:33:05 +0000 (14:33 +0200)
24 files changed:
src/common/ssl.c
src/mimeview.c
src/plugins/libravatar/claws.def
src/plugins/libravatar/libravatar_federation.c
src/plugins/notification/notification_command.c
src/plugins/notification/notification_core.c
src/plugins/notification/notification_foldercheck.c
src/plugins/notification/notification_popup.c
src/plugins/rssyl/rssyl_cb_menu.c
src/plugins/rssyl/rssyl_gtk.c
src/plugins/vcalendar/day-view.c
src/plugins/vcalendar/libical/libical/icalcomponent.c
src/plugins/vcalendar/libical/libical/icalmime.c
src/plugins/vcalendar/libical/libical/icalparameter.c
src/plugins/vcalendar/libical/libical/icalparser.c
src/plugins/vcalendar/libical/libical/icalproperty.c
src/plugins/vcalendar/libical/libical/sspm.c
src/plugins/vcalendar/month-view.c
src/plugins/vcalendar/vcal_folder.c
src/plugins/vcalendar/vcal_manager.h
src/plugins/vcalendar/vcal_meeting_gtk.c
src/plugins/vcalendar/vcalendar.c
src/prefs_account.c
src/wizard.c

index 28ba8967d5a8db1dff32a07c6e583494db7be9ba..b1812f920165f1df93c96f1647d1189e71af4dce 100644 (file)
@@ -262,7 +262,7 @@ gboolean ssl_init_socket(SockInfo *sockinfo)
 
 gnutls_x509_crt_t *ssl_get_certificate_chain(gnutls_session_t session, gint *list_len)
 {
-       const gnutls_datum *raw_cert_list;
+       const gnutls_datum_t *raw_cert_list;
        gnutls_x509_crt_t *certs = NULL;
        gboolean result = TRUE;
 
index 9326e47dee53ea91b98902f071d829a8fbf7b876..61dd53e0ba77628807f5e2827d1ae72c9dfd952a 100644 (file)
@@ -2721,7 +2721,8 @@ static gint mime_toggle_button_cb(GtkWidget *button, GdkEventButton *event,
        return TRUE;
 }
 
-void mimeview_update (MimeView *mimeview) {
+void mimeview_update (MimeView *mimeview)
+{
        if (mimeview && mimeview->mimeinfo) {
                icon_list_clear(mimeview);
                icon_list_create(mimeview, mimeview->mimeinfo);
index eb48bb6d69d94f4c2ecb0b6f94fed35c50f5c215..cbd9c1935b5c1ff0533e077e23fc27cbf28a63b7 100644 (file)
@@ -1,5 +1,6 @@
 LIBRARY CLAWS-MAIL.EXE
 EXPORTS
+auto_configure_service_sync
 extract_address
 get_locale_dir
 check_plugin_version
@@ -29,4 +30,4 @@ prefs_write_param
 prefs_common_get_prefs
 procmsg_msginfo_add_avatar
 procmsg_msginfo_get_avatar
-md5_hex_digest
+md5_hex_digest
\ No newline at end of file
index aee618e82329bac2e0b72270aef3f6e1b762aace..d35aa9b7261ada05bede1e381399dbe12957a7dd 100644 (file)
@@ -22,6 +22,7 @@
 #include "libravatar_federation.h"
 #include "libravatar_prefs.h"
 #include "utils.h"
+#include "gtkutils.h"
 
 #define MISSING "x"
 
index 3627715f20a86a4000633d079252088d0fa19669..0da54ec9e33ea9e4073fbc6810668069e51c1cda 100644 (file)
@@ -45,7 +45,6 @@ void notification_command_msg(MsgInfo *msginfo)
 {
   gchar *ret_str, *buf;
   gsize by_read = 0, by_written = 0;
-  FolderType ftype;
 
   if(!msginfo || !notify_config.command_enabled || !MSG_IS_NEW(msginfo->flags))
     return;
@@ -83,8 +82,6 @@ void notification_command_msg(MsgInfo *msginfo)
       return;
   } /* folder specific */
 
-  ftype = msginfo->folder->folder->klass->type;
-
   buf = g_strdup(notify_config.command_line);
 
   G_LOCK(command);
index 2a96d5583622e2710f4480ed47e91e0803f1bf34..d797b8402bc07463e811b90e963cd181cd584813 100644 (file)
@@ -454,9 +454,7 @@ static void notification_new_unnotified_do_msg(MsgInfo *msg)
 #ifdef HAVE_LIBCANBERRA_GTK
   /* canberra */
   if(notify_config.canberra_play_sounds && !canberra_new_email_is_playing) {
-    MainWindow *mainwin;
     ca_proplist *proplist;
-    mainwin = mainwindow_get_mainwindow();
     ca_proplist_create(&proplist);
     ca_proplist_sets(proplist,CA_PROP_EVENT_ID ,"message-new-email");
     canberra_new_email_is_playing = TRUE;
index 5c0172cba32e8b73db5c35562795d5990e30dcff..f1d05b2ea1de710bcb707c2f40bcdc8d6ec04292 100644 (file)
@@ -1,3 +1,4 @@
+
 /* Notification plugin for Claws-Mail
  * Copyright (C) 2005-2007 Holger Berndt
  *
@@ -768,10 +769,6 @@ static void foldercheck_append_item(GtkTreeStore *store, FolderItem *item,
 {
   gchar *name, *tmpname;
   GdkPixbuf *pixbuf, *pixbuf_open;
-  gboolean use_color;
-  PangoWeight weight = PANGO_WEIGHT_NORMAL;
-  GdkColor *foreground = NULL;
-  static GdkColor color_noselect = {0, COLOR_DIM, COLOR_DIM, COLOR_DIM};
 
   name = tmpname = folder_item_get_name(item);
 
@@ -812,23 +809,6 @@ static void foldercheck_append_item(GtkTreeStore *store, FolderItem *item,
   pixbuf = item->no_select ? foldernoselect_pixbuf : folder_pixbuf;
   pixbuf_open =
     item->no_select ? foldernoselect_pixbuf : folderopen_pixbuf;
-
-  if (folder_has_parent_of_type(item, F_DRAFT) ||
-      folder_has_parent_of_type(item, F_OUTBOX) ||
-      folder_has_parent_of_type(item, F_TRASH)) {
-    use_color = FALSE;
-  } else if (folder_has_parent_of_type(item, F_QUEUE)) {
-    use_color = (item->total_msgs > 0);
-    if (item->total_msgs > 0)
-      weight = PANGO_WEIGHT_BOLD;
-  } else {
-    if (item->unread_msgs > 0)
-      weight = PANGO_WEIGHT_BOLD;
-    use_color = (item->new_msgs > 0);
-  }
-  
-  if (item->no_select)
-    foreground = &color_noselect;
   
   /* insert this node */
   gtk_tree_store_append(store, iter, parent);
index e74148c73444f3b041f87fdb2941aecdcaffc8e3..7393af2bfb43a3e3ada9a23cbca010a3fc102e42 100644 (file)
@@ -92,11 +92,12 @@ static gboolean notification_popup_button(GtkWidget*, GdkEventButton*, gpointer)
 
 void notification_popup_msg(MsgInfo *msginfo)
 {
-  gboolean retval;
   FolderType ftype;
-  NotificationPopup *ppopup;
 #if HAVE_LIBNOTIFY
   gchar *uistr;
+#else
+  NotificationPopup *ppopup;
+  gboolean retval;
 #endif
   NotificationFolderType nftype;
 
@@ -171,8 +172,7 @@ void notification_popup_msg(MsgInfo *msginfo)
     return;
   }
 
-  ppopup = &(popup[nftype]);
-  retval = notification_libnotify_add_msg(msginfo, nftype);
+  notification_libnotify_add_msg(msginfo, nftype);
 #else /* !HAVE_LIBNOTIFY */
   ppopup = &popup;
   retval = notification_popup_add_msg(msginfo);
index 85b51fe2cfcc271cd43c572dc3e42c82fe01c757..f3047dea0b88c4dfc464d566112bb56801ff8c84 100644 (file)
@@ -220,7 +220,6 @@ void rssyl_remove_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);
@@ -240,7 +239,6 @@ void rssyl_remove_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 ||
index c4dba86db9dcbe4a69b5cf4b3e7eaceadeaf1c26..2c7549279efb79b4002b396ad532a511910132f1 100644 (file)
@@ -236,7 +236,7 @@ static RSSylFeedProp *rssyl_gtk_prop_real(RSSylFolderItem *ritem)
                                                *ok_hbox, *ok_image, *ok_label, *silent_update_label;
 
        GtkObject *refresh_adj, *expired_adj, *fetch_comments_for_adj;
-       gint refresh, expired;
+       gint refresh;
        gint row = 0;
 
        g_return_val_if_fail(ritem != NULL, NULL);
@@ -283,11 +283,6 @@ static RSSylFeedProp *rssyl_gtk_prop_real(RSSylFolderItem *ritem)
        feedprop->fetch_comments_for = gtk_spin_button_new(GTK_ADJUSTMENT(fetch_comments_for_adj),
                        1, 0);
 
-       if( ritem->default_expired_num )
-               expired = rssyl_prefs_get()->expired;
-       else
-               expired = ritem->expired_num;
-
        /* Refresh interval spinbutton */
        refresh_adj = gtk_adjustment_new(refresh,
                        0, 100000, 1, 10, 0);
index d8bd71703de3b365a16f89121d981f32fadcf8d5..53cc7cb520ef7ffe37ddaf1d62809b3aa3f9e284 100644 (file)
@@ -739,7 +739,6 @@ static void fill_hour(day_win *dw, gint col, gint row, char *text)
 static void build_day_view_table(day_win *dw)
 {
     gint days;   /* number of days to show */
-    int year, month, day;
     gint i = 0;
     GtkWidget *label, *button;
     char text[5+1], *date, *today;
@@ -781,9 +780,6 @@ static void build_day_view_table(day_win *dw)
 
     tm_date = dw->startdate;
 
-    year = tm_date.tm_year + 1900;
-    month = tm_date.tm_mon;
-    day = tm_date.tm_mday;
     if (((tm_date.tm_year%4) == 0) && (((tm_date.tm_year%100) != 0) 
             || ((tm_date.tm_year%400) == 0)))
         monthdays[1] = 29;
index 5c8cf1667cc27679eb0c2b838e9fa1ad2070c7ec..26754b2d21ade08085e5ec67a369e25b3d99e738 100644 (file)
@@ -397,15 +397,12 @@ icalcomponent_remove_property (icalcomponent* component, icalproperty* property)
 {
     struct icalcomponent_impl *impl;
     pvl_elem itr, next_itr;
-    struct icalproperty_impl *pimpl;
 
     icalerror_check_arg_rv( (component!=0), "component");
     icalerror_check_arg_rv( (property!=0), "property");
     
     impl = (struct icalcomponent_impl*)component;
 
-    pimpl = (struct icalproperty_impl*)property;
-
     icalerror_assert( (icalproperty_get_parent(property)),"The property is not a member of a component");
 
     
index 78cd414036a8c13c1df69980730d46dadf9d7834..1eeff365e41d52f90aca0ccc3a6a27d47202de52 100644 (file)
@@ -168,14 +168,15 @@ icalcomponent* icalmime_parse(char* (*get_string)(char *s, size_t size,
     struct sspm_part *parts;
     int i, last_level=0;
     icalcomponent *root=0, *parent=0, *comp=0, *last = 0;
+    size_t alloc_len = NUM_PARTS * sizeof(struct sspm_part);
 
     if ( (parts = (struct sspm_part *)
-         malloc(NUM_PARTS*sizeof(struct sspm_part)))==0) {
+         malloc(alloc_len))==0) {
        icalerror_set_errno(ICAL_NEWFAILED_ERROR);
        return 0;
     }
 
-    memset(parts,0,sizeof(parts));
+    memset(parts, 0, alloc_len);
 
     sspm_parse_mime(parts, 
                    NUM_PARTS, /* Max parts */
@@ -354,14 +355,15 @@ int icalmime_test(char* (*get_string)(char *s, size_t size, void *d),
     char *out;
     struct sspm_part *parts;
     int i;
+    size_t alloc_len = NUM_PARTS * sizeof(struct sspm_part);
 
     if ( (parts = (struct sspm_part *)
-         malloc(NUM_PARTS*sizeof(struct sspm_part)))==0) {
+         malloc(alloc_len))==0) {
        icalerror_set_errno(ICAL_NEWFAILED_ERROR);
        return 0;
     }
 
-    memset(parts,0,sizeof(parts));
+    memset(parts,0,alloc_len);
 
     sspm_parse_mime(parts, 
                    NUM_PARTS, /* Max parts */
index 156ecdb04b0bfbf291c90b19207861510540909a..4a04380a56f61737fac9d7cf24a34725e7ba534b 100644 (file)
@@ -106,7 +106,7 @@ icalparameter_free (icalparameter* parameter)
        free ((void*)impl->x_name);
     }
     
-    memset(impl,0,sizeof(impl));
+    memset(impl,0,sizeof(*impl));
 
     impl->parent = 0;
     impl->id[0] = 'X';
index e4f6bbaecb005af76d2b8c42c95f5d9f1ab71f1d..bfcccdf7fbca5ebdccad09c1f5a74a5f821dbc71 100644 (file)
@@ -619,7 +619,6 @@ icalcomponent* icalparser_parse(icalparser *parser,
 icalcomponent* icalparser_add_line(icalparser* parser,
                                        char* line)
 { 
-    char *p; 
     char *str;
     char *end;
     int vcount = 0;
@@ -794,7 +793,6 @@ icalcomponent* icalparser_add_line(icalparser* parser,
 
     /* Now, add any parameters to the last property */
 
-    p = 0;
     while(1) {
 
        if (*(end-1) == ':'){
index c5638827e5b539dae19d27070496b7f64d9c5237..a848a898b821b189ceb23fd07dc8a9ddff7f63bf 100644 (file)
@@ -514,7 +514,7 @@ const char* icalproperty_get_parameter_as_string(icalproperty* prop,
     
     kind = icalparameter_string_to_kind(name);
 
-    if(kind == ICAL_NO_PROPERTY){
+    if(kind == ICAL_NO_PARAMETER){
         /* icalenum_string_to_parameter_kind will set icalerrno */
         return 0;
     }
index a9ae54fdea5a842a6cb42c36f865715ab1b2ed77..6d1d470a6caf3211e3c3f33f4c299f35861f8f61 100644 (file)
@@ -438,7 +438,7 @@ enum sspm_major_type sspm_find_major_content_type(char* type)
 
     char* ltype = sspm_lowercase(type);
 
-    for (i=0; major_content_type_map[i].type !=  SSPM_UNKNOWN_MINOR_TYPE; i++){
+    for (i=0; major_content_type_map[i].type !=  SSPM_UNKNOWN_MAJOR_TYPE; i++){
        if(strncmp(ltype, major_content_type_map[i].str,
                   strlen(major_content_type_map[i].str))==0){
            free(ltype);
@@ -478,7 +478,7 @@ char* sspm_major_type_string(enum sspm_major_type type)
 {
     int i;
 
-    for (i=0; major_content_type_map[i].type !=  SSPM_UNKNOWN_MINOR_TYPE; 
+    for (i=0; major_content_type_map[i].type !=  SSPM_UNKNOWN_MAJOR_TYPE; 
         i++){
 
        if(type == major_content_type_map[i].type){
index 6ecc834ac69efb956b6138a46ac45198e04c8cdc..93c504b613c9ee1311eb20f2e6d9c23fefe1d47a 100644 (file)
@@ -821,7 +821,6 @@ static void fill_hour(month_win *mw, gint col, gint row, char *text)
 static void build_month_view_table(month_win *mw)
 {
     gint days;   /* number of days to show */
-    int year, month, day;
     gint i = 0;
     GtkWidget *button;
     struct tm tm_date, tm_today;
@@ -885,9 +884,6 @@ static void build_month_view_table(month_win *mw)
 
     tm_date = mw->startdate;
 
-    year = tm_date.tm_year + 1900;
-    month = tm_date.tm_mon;
-    day = tm_date.tm_mday;
     if (((tm_date.tm_year%4) == 0) && (((tm_date.tm_year%100) != 0) 
             || ((tm_date.tm_year%400) == 0)))
         ++monthdays[1];
@@ -958,6 +954,7 @@ static void build_month_view_table(month_win *mw)
 
     /* hours column = hour rows */
     for (i = 0; i <= 6; i++) {
+       int day;
        for (day = 1; day <= monthdays[tm_date.tm_mon]; day++) {
            date = g_date_new_dmy(day, tm_date.tm_mon+1, tm_date.tm_year+1900);
            int row = (int)g_date_get_monday_week_of_year(date);
index e18240a95a9dbe0e1ded0b13df2e4ffaea6ecb66..a376914d602242b3782d41cffb8252019b0a20d0 100644 (file)
@@ -1626,12 +1626,10 @@ gchar *vcal_curl_read(const char *url, const gchar *label, gboolean verbose,
        pthread_attr_t pta;
 #endif
        void *res;
-       gboolean killed;
        gchar *error = NULL;
        result = NULL;
        td = g_new0(thread_data, 1);
        res = NULL;
-       killed = FALSE;
 
        td->url  = url;
        td->result  = NULL;
@@ -1941,7 +1939,6 @@ static void unsubscribe_cal_cb(GtkAction *action, gpointer data)
        FolderItem *item;
        gchar *message;
        AlertValue avalue;
-       gchar *old_path;
        gchar *old_id;
 
        if (!folderview->selected) return;
@@ -1959,7 +1956,6 @@ static void unsubscribe_cal_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);
 
        vcal_item_closed(item);
index 9d40fb00148ecbfb51ffcfa49e24c70f44f309c0..4545cd64a5025830486139899b28bff3271c34b5 100644 (file)
@@ -51,7 +51,7 @@ struct _VCalEvent
        enum icalproperty_method method;
        gint sequence;  
        gchar *url;
-       enum icalproperty_kind type;
+       enum icalcomponent_kind type;
        time_t postponed;
        gboolean rec_occurence;
 };
index c2d14192445d6d32aa6455aedfe8322b56f4b488..c5cf89e9587e6c48ef8ee85e0f3d4cfb23cb3c34 100644 (file)
@@ -1392,12 +1392,10 @@ static VCalMeeting *vcal_meeting_create_real(VCalEvent *event, gboolean visible)
        GtkTextBuffer *buffer = NULL;
        GtkWidget *date_hbox, *date_vbox, *save_hbox, *label, *hbox;
        gchar *s = NULL;
-       GtkObject *start_h_adj, *start_m_adj, *end_h_adj, *end_m_adj;
        int i = 0, num = 0;
        GtkWidget *scrolledwin;
        GList *times = NULL;
        GList *accounts;
-       GtkListStore *menu;
        gchar *time_text = NULL;
 #ifdef GENERIC_UMPC
        GtkWidget *notebook;
@@ -1411,10 +1409,6 @@ static VCalMeeting *vcal_meeting_create_real(VCalEvent *event, gboolean visible)
        meet->tips = tips;
 #endif
        meet->visible = visible;
-       start_h_adj = gtk_adjustment_new (0, 0, 23, 1, 10, 10);
-       start_m_adj = gtk_adjustment_new (0, 0, 59, 1, 10, 10);
-       end_h_adj   = gtk_adjustment_new (0, 0, 23, 1, 10, 10);
-       end_m_adj   = gtk_adjustment_new (0, 0, 59, 1, 10, 10);
 
        meet->window            = gtkut_window_new(GTK_WINDOW_TOPLEVEL, "vcal_meeting_gtk");
 #ifndef GENERIC_UMPC
@@ -1440,7 +1434,6 @@ static VCalMeeting *vcal_meeting_create_real(VCalEvent *event, gboolean visible)
        meet->start_time = gtk_combo_box_text_new_with_entry();
 #endif
        gtk_combo_box_set_active(GTK_COMBO_BOX(meet->start_time), -1);
-       menu = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(meet->start_time)));
 #if !GTK_CHECK_VERSION(2, 24, 0)       
        combobox_set_popdown_strings(GTK_COMBO_BOX(meet->start_time), times);
 #else  
@@ -1453,7 +1446,6 @@ static VCalMeeting *vcal_meeting_create_real(VCalEvent *event, gboolean visible)
        meet->end_time = gtk_combo_box_text_new_with_entry();
 #endif
        gtk_combo_box_set_active(GTK_COMBO_BOX(meet->end_time), -1);
-       menu = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(meet->end_time)));
 #if !GTK_CHECK_VERSION(2, 24, 0)       
        combobox_set_popdown_strings(GTK_COMBO_BOX(meet->end_time), times);
 #else  
index 1362ded24ceb4270bd775d3d3e4a394382940c49..263d542754945911f506253408c572c573da15e0 100644 (file)
@@ -1380,7 +1380,6 @@ void vcalendar_done(void)
        MainWindow *mainwin = mainwindow_get_mainwindow();
        FolderView *folderview = NULL;
        FolderItem *fitem = NULL;
-       SummaryView *summaryview = NULL;
 
        icalmemory_free_ring();
 
@@ -1389,7 +1388,6 @@ void vcalendar_done(void)
        if (mainwin == NULL)
                return;
 
-       summaryview = mainwin->summaryview;
        folderview = mainwin->folderview;
        fitem = folderview->summaryview->folder_item;
 
index d9d52bb316236fa99dcaee3c692a1eb9b4a78312..cae698d8a2347d7717cac49eca783573387318e0 100644 (file)
@@ -3888,7 +3888,7 @@ static void auto_configure_cb (GtkWidget *widget, gpointer data)
        send_data->ssl_checkbtn = NULL;
        send_data->default_port = 25;
        send_data->default_ssl_port = -1;
-       send_data->auth_checkbtn = send_page.smtp_auth_checkbtn;
+       send_data->auth_checkbtn = GTK_TOGGLE_BUTTON(send_page.smtp_auth_checkbtn);
 
        auto_configure_service(send_data);
 
index c17e13dd3e5043d322de0ddb3eb2436c8be370d8..1686affca2642a4e6b1931c0f96fbae1bc283724 100644 (file)
@@ -1429,7 +1429,7 @@ static void auto_configure_cb (GtkWidget *widget, gpointer data)
        send_data->ssl_checkbtn = GTK_TOGGLE_BUTTON(wizard->smtp_use_ssl);
        send_data->default_port = 25;
        send_data->default_ssl_port = -1;
-       send_data->auth_checkbtn = wizard->smtp_auth;
+       send_data->auth_checkbtn = GTK_TOGGLE_BUTTON(wizard->smtp_auth);
 
        auto_configure_service(send_data);