Changeset 3235

Show
Ignore:
Timestamp:
01/11/08 13:45:47
Author:
pvanhoof
Message:
        • Fixed compiler warnings
Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/ChangeLog

    r3232 r3235  
    33        * Preparations for the new summary store 
    44        * Made all remaining static libraries LTLIBRARIES 
     5        * Fixed compiler warnings 
    56 
    672008-01-11 Alberto Garcia Gonzalez <agarcia@igalia.com> 
  • trunk/libtinymail-camel/camel-lite/camel/camel-folder-summary.c

    r3217 r3235  
    862862 * Returns %0 on success or %-1 on fail 
    863863 **/ 
     864 
     865#ifdef SAVE_APPEND 
    864866static int 
    865867camel_folder_summary_save_append (CamelFolderSummary *s, CamelException *ex) 
     
    10041006        return -1; 
    10051007} 
     1008#endif 
    10061009 
    10071010static int 
     
    11561159{ 
    11571160        int retval; 
    1158  
    1159         //if (s->had_expunges) 
     1161#ifdef SAVE_APPEND 
     1162        if (s->had_expunges) 
     1163#endif 
    11601164                retval = camel_folder_summary_save_rewrite (s, ex); 
    1161         //else 
    1162         //      retval = camel_folder_summary_save_append (s, ex); 
     1165#ifdef SAVE_APPEND 
     1166        else 
     1167                retval = camel_folder_summary_save_append (s, ex); 
     1168#endif 
    11631169 
    11641170        s->had_expunges = FALSE; 
  • trunk/libtinymail-camel/camel-lite/camel/camel-stream-buffer.c

    r3130 r3235  
    3434#include "camel-stream-buffer.h" 
    3535#include "camel-tcp-stream.h" 
     36 
     37#include "camel-operation.h" 
    3638 
    3739static CamelStreamClass *parent_class = NULL; 
  • trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-command.c

    r3224 r3235  
    5050 
    5151#include "camel-string-utils.h" 
     52#include "camel-stream-buffer.h" 
    5253 
    5354extern int camel_verbose_debug; 
     
    6667                                         const char *fmt, ...); 
    6768 
    68  
     69#ifdef NOTUSED 
    6970static int 
    7071uid_compar (const void *va, const void *vb) 
     
    8283                return 1; 
    8384} 
     85 
     86#endif 
    8487 
    8588/** 
  • trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-folder.c

    r3168 r3235  
    6161 
    6262#include "camel-stream-fs.h" 
    63  
     63#include "camel-utf8.h" 
    6464#include "camel-data-wrapper.h" 
    6565#include "camel-debug.h" 
     
    44844484  CamelImapFolder *imap_folder = (CamelImapFolder *) folder; 
    44854485  gchar *path = g_strdup_printf ("%s/%s_%s_CONVERTED", imap_folder->cache->path, uid, spec); 
    4486   gboolean retry = TRUE; 
    44874486  gint ex_id; 
    44884487  gboolean err = FALSE, found = FALSE; 
     
    45064505 
    45074506        } else { 
    4508                 CamelStreamBuffer *server_stream; 
    45094507                int fd; 
    45104508 
     
    47504748        } else { 
    47514749 
    4752                 char *tag, line[MAX_LINE_LEN]; 
    4753                 int taglen; 
    4754                 CamelStreamBuffer *server_stream; 
    47554750                int fd; 
    47564751 
     
    51605155                        CamelImapResponse *response; 
    51615156                        gint i = 0; gchar *resp; 
    5162                         gboolean cont = FALSE; 
    51635157                        gboolean hdr_bin=FALSE; 
    51645158 
     
    54735467                                                        line += 7; 
    54745468 
    5475                                                 body = imap_parse_nstring ((const char **) &line, &body_len); 
     5469                                                body = imap_parse_nstring ((const char **) &line, (size_t *) &body_len); 
    54765470                                                if (body) { 
    54775471                                                        done = TRUE; 
  • trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-message-cache.c

    r3070 r3235  
    187187                if (p) 
    188188                        uid = g_strndup (dname, p - dname); 
    189                 else if (p = strchr (dname, '_')) 
     189                else if ((p = strchr (dname, '_'))) 
    190190                        uid = g_strndup (dname, p - dname); 
    191191                else 
  • trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store-summary.c

    r3230 r3235  
    549549                namespace_clear (s); 
    550550 
    551         if (camel_file_util_decode_uint32(in, &count) == -1) 
     551        if (camel_file_util_decode_uint32(in, (guint32 *) &count) == -1) 
    552552                goto nserror; 
    553553 
     
    617617{ 
    618618        CamelImapStoreSummary *is = (CamelImapStoreSummary *)s; 
    619         gint32 version, capabilities, count
     619        gint32 version, capabilities
    620620 
    621621        namespace_clear(s); 
     
    645645{ 
    646646        CamelImapStoreSummary *is = (CamelImapStoreSummary *)s; 
    647         guint32 count; 
    648647 
    649648        /* always write as latest version */ 
  • trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.c

    r3207 r3235  
    18441844        CamelImapResponse *response; 
    18451845        /*struct _namespaces *namespaces;*/ 
    1846         char *result, *name
     1846        char *result
    18471847        size_t len; 
    18481848        CamelImapStoreNamespace *ns; 
     
    23242324} 
    23252325 
     2326#ifdef NOT_USED 
    23262327static void 
    23272328camel_imap_store_set_status_for (CamelImapStore *imap_store, const char *folder_name, guint32 messages, guint32 unseen, guint32 uidnext) 
     
    24712472} 
    24722473 
     2474#endif 
    24732475 
    24742476static void 
     
    34953497 
    34963498                /* We'll start with SELECT context */ 
    3497                 prefix = g_strdup_printf (""); 
     3499                prefix = g_strdup (""); 
    34983500 
    34993501                /* We'll start with % if we know that there are other namespaces. 
     
    37003702        CamelFolderInfo *fi, *hfi; 
    37013703        char *list; 
    3702         int i, count, j
     3704        int i, count
    37033705        GHashTable *present; 
    37043706        CamelStoreInfo *si; 
     
    42244226 
    42254227 
    4226 /* FIXME: please god, when will the hurting stop? Thus function is so 
    4227    fucking broken it's not even funny. */ 
    4228 ssize_t 
    4229 camel_imap_store_readline_idle (CamelImapStore *store, char **dest, CamelException *ex) 
    4230 { 
    4231         CamelStreamBuffer *stream; 
    4232         char linebuf[1024] = {0}; 
    4233         GByteArray *ba; 
    4234         ssize_t nread; 
    4235  
    4236         g_return_val_if_fail (CAMEL_IS_IMAP_STORE (store), -1); 
    4237         g_return_val_if_fail (dest, -1); 
    4238  
    4239         *dest = NULL; 
    4240  
    4241         /* Check for connectedness. Failed (or cancelled) operations will 
    4242          * close the connection. We can't expect a read to have any 
    4243          * meaning if we reconnect, so always set an exception. 
    4244          */ 
    4245  
    4246         if (!camel_disco_store_check_online((CamelDiscoStore *)store, ex)) 
    4247                 return -1; 
    4248  
    4249         camel_imap_store_restore_stream_buffer (store); 
    4250         stream = CAMEL_STREAM_BUFFER (store->istream); 
    4251  
    4252         ba = g_byte_array_new (); 
    4253         while ((nread = camel_stream_buffer_gets_idle (stream, linebuf, sizeof (linebuf))) > 0) { 
    4254                 g_byte_array_append (ba, (const guchar*) linebuf, nread); 
    4255                 if (linebuf[nread - 1] == '\n') 
    4256                         break; 
    4257         } 
    4258  
    4259         if (nread <= 0) { 
    4260                 if (errno == EINTR) 
    4261                 { 
    4262                         CamelException mex = CAMEL_EXCEPTION_INITIALISER; 
    4263                         camel_exception_set (ex, CAMEL_EXCEPTION_USER_CANCEL, _("Operation cancelled")); 
    4264                         camel_imap_recon (store, &mex); 
    4265                         imap_debug ("Recon in idle: %s\n", camel_exception_get_description (&mex)); 
    4266                 } else { 
    4267                         camel_exception_setv (ex, CAMEL_EXCEPTION_SERVICE_UNAVAILABLE, 
    4268                                               _("Server unexpectedly disconnected: %s"), 
    4269                                               g_strerror (errno)); 
    4270                         camel_service_disconnect (CAMEL_SERVICE (store), FALSE, NULL); 
    4271                 } 
    4272  
    4273                 g_byte_array_free (ba, TRUE); 
    4274                 return -1; 
    4275         } 
    4276  
    4277         if (camel_verbose_debug) { 
    4278                 fprintf (stderr, "received: "); 
    4279                 fwrite (ba->data, 1, ba->len, stderr); 
    4280         } 
    4281  
    4282         /* camel-imap-command.c:imap_read_untagged expects the CRLFs 
    4283            to be stripped off and be nul-terminated *sigh* */ 
    4284         nread = ba->len - 1; 
    4285         ba->data[nread] = '\0'; 
    4286         if (ba->data[nread - 1] == '\r') { 
    4287                 ba->data[nread - 1] = '\0'; 
    4288                 nread--; 
    4289         } 
    4290  
    4291         *dest = (char *) ba->data; 
    4292         g_byte_array_free (ba, FALSE); 
    4293  
    4294         return nread; 
    4295 } 
    4296  
    42974228ssize_t 
    42984229camel_imap_store_readline_nl (CamelImapStore *store, char **dest, CamelException *ex) 
  • trunk/libtinymail-camel/camel-lite/camel/providers/imap/camel-imap-store.h

    r3177 r3235  
    193193ssize_t camel_imap_store_readline_nb (CamelImapStore *store, char **dest, CamelException *ex); 
    194194ssize_t camel_imap_store_readline (CamelImapStore *store, char **dest, CamelException *ex); 
    195 ssize_t camel_imap_store_readline_idle (CamelImapStore *store, char **dest, CamelException *ex); 
    196195 
    197196gboolean camel_imap_store_restore_stream_buffer (CamelImapStore *store); 
  • trunk/libtinymail-camel/camel-lite/camel/providers/local/camel-maildir-folder.c

    r3217 r3235  
    239239        CamelMimeMessage *message = NULL; 
    240240        CamelMessageInfo *info; 
    241         char *name, *filen;  
    242         gboolean nfree = FALSE; 
     241        char *name;  
    243242        CamelMaildirMessageInfo *mdi; 
    244243 
  • trunk/libtinymail-camel/camel-lite/camel/providers/local/camel-maildir-summary.c

    r3218 r3235  
    204204{ 
    205205        const char *uid; 
    206         guint32 priority_flag = 0;      /* 2 bits flags */ 
    207206        char *p, *buf; 
    208207        int i; 
     
    232231{ 
    233232        char *p, c; 
    234         guint32 priority_flag = 0;      /* 2 bits flags */ 
    235233        guint32 set = 0;        /* what we set */ 
    236234        int i; 
  • trunk/libtinymail-camel/camel-lite/camel/providers/pop3/camel-pop3-engine.c

    r3169 r3235  
    3636#include "camel-sasl.h" 
    3737#include "camel-service.h" 
     38#include "camel-string-utils.h" 
    3839 
    3940/* max 'outstanding' bytes in output stream, so we can't deadlock waiting 
     
    248249                                char *delay; 
    249250                                pe->capa |= CAMEL_POP3_CAP_LOGIN_DELAY; 
    250                                 delay = strchr (line, ' '); 
     251                                delay = strchr ((const char *) line, ' '); 
    251252                                if (delay) { 
    252253                                        delay++; 
  • trunk/libtinymail-camel/camel-lite/camel/providers/pop3/camel-pop3-folder.c

    r3126 r3235  
    272272{ 
    273273        CamelPOP3Store *pop3_store = CAMEL_POP3_STORE (folder->parent_store); 
    274         CamelPOP3Folder *pop3_folder = (CamelPOP3Folder *) folder; 
    275274        CamelPOP3Command *pcl, *pcu = NULL; 
    276275        int i, hcnt = 0, lcnt = 0; 
    277         CamelException dex = CAMEL_EXCEPTION_INITIALISER; 
    278276        CamelFolderChangeInfo *changes = NULL; 
    279277        GList *deleted = NULL; 
     
    522520        int i, max; 
    523521        CamelMessageInfoBase *info; 
    524         CamelException dex = CAMEL_EXCEPTION_INITIALISER; 
    525522        GList *deleted = NULL; 
    526523        CamelFolderChangeInfo *changes = NULL; 
     
    816813 
    817814                /* heuristics */ 
    818                 if (camel_strstrcase (buffer, "Content-Disposition: attachment") != NULL) 
     815                if (camel_strstrcase ((const char *) buffer, "Content-Disposition: attachment") != NULL) 
    819816                        fi->has_attachments = TRUE; 
    820                 else if (camel_strstrcase (buffer, "filename=") != NULL && 
    821                          strchr (buffer, '.')) 
     817                else if (camel_strstrcase ((const char *) buffer, "filename=") != NULL && 
     818                         strchr ((const char *) buffer, '.')) 
    822819                        fi->has_attachments = TRUE; 
    823                 else if (camel_strstrcase (buffer, "Content-Type: message/rfc822") != NULL) 
     820                else if (camel_strstrcase ((const char *) buffer, "Content-Type: message/rfc822") != NULL) 
    824821                        fi->has_attachments = TRUE; 
    825822 
     
    925922        CamelFolderSummary *summary = folder->summary; 
    926923        CamelMessageInfoBase *mi; gboolean im_certain=FALSE; 
    927         CamelException dex = CAMEL_EXCEPTION_INITIALISER; 
    928924        gint retry = 0; 
    929925        gboolean had_attachment = FALSE; 
     
    12651261        CamelMimeMessage *message = NULL; 
    12661262        CamelPOP3Store *pop3_store = CAMEL_POP3_STORE (folder->parent_store); 
    1267         CamelPOP3Folder *pop3_folder = (CamelPOP3Folder *)folder; 
    12681263        CamelPOP3Command *pcr; 
    12691264        CamelPOP3FolderInfo *fi; 
     
    14601455pop3_set_message_flags (CamelFolder *folder, const char *uid, guint32 flags, guint32 set) 
    14611456{ 
    1462         CamelPOP3Folder *pop3_folder = CAMEL_POP3_FOLDER (folder); 
    14631457        CamelPOP3FolderInfo *fi; 
    14641458        gboolean res = FALSE; 
  • trunk/libtinymail-camel/camel-lite/summary/summary.c

    r3233 r3235  
    932932} 
    933933 
     934#ifdef DONT 
    934935static void 
    935936summary_dump (Summary *summary) 
     
    948949        return; 
    949950} 
     951#endif 
    950952 
    951953static inline void 
     
    11061108} 
    11071109 
     1110#ifdef DONT 
    11081111static void  
    11091112foreach_item_print_it (gpointer key, gpointer value, gpointer user_data) 
     
    11341137} 
    11351138 
    1136 #ifdef DONT 
    11371139 
    11381140int  
  • trunk/libtinymail-camel/tny-camel-account.c

    r3125 r3235  
    19791979                        __FUNCTION__); 
    19801980        } else { 
    1981                 TnyCamelQueue *temp_queue = _tny_camel_queue_new (self); 
     1981                /* TnyCamelQueue *temp_queue = _tny_camel_queue_new (self); */ 
    19821982                g_thread_create (tny_camel_account_get_supported_secure_authentication_async_thread, 
    19831983                        info, FALSE, NULL); 
  • trunk/libtinymail-camel/tny-camel-bs-mime-part.c

    r3171 r3235  
    545545        DecodeAsyncInfo *info = (DecodeAsyncInfo *) user_data; 
    546546        TnyCamelBsMimePartPriv *priv = TNY_CAMEL_BS_MIME_PART_GET_PRIVATE (info->self); 
    547         TnyCamelFolderPriv *fpriv = TNY_CAMEL_FOLDER_GET_PRIVATE (priv->folder); 
    548547        CamelOperation *cancel; 
    549548 
     
    644643tny_camel_bs_mime_part_construct_from_stream_default (TnyMimePart *self, TnyStream *stream, const gchar *type) 
    645644{ 
    646         TnyCamelBsMimePartPriv *priv = TNY_CAMEL_BS_MIME_PART_GET_PRIVATE (self); 
    647645        return -1; 
    648646} 
  • trunk/libtinymail-camel/tny-camel-bs-msg-receive-strategy.c

    r3070 r3235  
    7070{ 
    7171        TnyCamelBsMimePartPriv *ppriv = TNY_CAMEL_BS_MIME_PART_GET_PRIVATE (part); 
    72         TnyCamelFolderPriv *fpriv = TNY_CAMEL_FOLDER_GET_PRIVATE (folder); 
    7372        gchar *uid = ppriv->uid; 
    7473        bodystruct_t *bodystruct = ppriv->bodystructure; 
     
    114113{ 
    115114        TnyMsg *message = NULL; 
    116         gchar *filename, *uid; 
    117         FILE *file; 
     115        gchar *uid; 
    118116        CamelException ex = CAMEL_EXCEPTION_INITIALISER; 
    119117        bodystruct_t *bodystructure = NULL; 
     
    136134 
    137135        if (structure_str) { 
    138                 bodystructure = bodystruct_parse (structure_str, strlen (structure_str), 
     136                bodystructure = bodystruct_parse ((guchar *) structure_str, strlen (structure_str), 
    139137                        &parse_err); 
    140138                if (parse_err) { 
  • trunk/libtinymail-camel/tny-camel-folder.c

    r3186 r3235  
    24802480                        TNY_FOLDER_ERROR_GET_MSG, 
    24812481                        "Folder not ready for getting messages"); 
    2482                 return
     2482                return NULL
    24832483        } 
    24842484 
     
    25462546                        TNY_FOLDER_ERROR_GET_MSG, 
    25472547                        "Folder not ready for finding messages"); 
    2548                 return
     2548                return NULL
    25492549        } 
    25502550 
     
    32223222                        TNY_FOLDER_ERROR_COPY, 
    32233223                        "Folder not ready for copy"); 
    3224                 return
     3224                return NULL
    32253225        } 
    32263226 
  • trunk/libtinymail-camel/tny-camel-imap-folder.c

    r3074 r3235  
    9191tny_camel_imap_folder_instance_init (GTypeInstance *instance, gpointer g_class) 
    9292{ 
     93#ifdef IMAP_PART_FETCH 
    9394        TnyCamelFolderPriv *priv = TNY_CAMEL_FOLDER_GET_PRIVATE (instance); 
    94  
    95 #ifdef IMAP_PART_FETCH 
    9695 
    9796        /* By default disabled until after the first release */ 
  • trunk/libtinymail-camel/tny-camel-mime-part.c

    r3171 r3235  
    677677                        "tny_mime_part_construct_from_stream first")); 
    678678                camel_object_unref (CAMEL_OBJECT (cstream)); 
    679                 return
     679                return -1
    680680        } 
    681681 
  • trunk/libtinymail-camel/tny-camel-msg-header.c

    r3137 r3235  
    2222#include <glib/gi18n-lib.h> 
    2323 
     24#include <ctype.h> 
    2425#include <glib.h> 
    2526#include <string.h> 
  • trunk/libtinymail-camel/tny-camel-queue.c

    r2993 r3235  
    264264_tny_camel_queue_remove_items (TnyCamelQueue *queue, TnyCamelQueueItemFlags flags) 
    265265{ 
    266         GList *copy = NULL, *rem = NULL
     266        GList *copy = NULL
    267267 
    268268        g_static_rec_mutex_lock (queue->lock); 
  • trunk/libtinymail/tny-folder-monitor.c

    r3161 r3235  
    197197remove_headers_from_list (TnyList *list, GPtrArray *array) 
    198198{ 
    199         TnyIterator *iter; 
    200         TnyHeader *header = NULL; 
    201199        gint i=0; 
    202200 
  • trunk/libtinymail/tny-header.c

    r3161 r3235  
    567567{ 
    568568        TnyHeaderFlags flags; 
    569         g_return_if_fail  (priority & TNY_HEADER_FLAG_PRIORITY_MASK != priority); 
     569        g_return_if_fail  ((priority & TNY_HEADER_FLAG_PRIORITY_MASK) != priority); 
    570570 
    571571        /* Is this necessary? */ 
  • trunk/libtinymail/tny-mime-part.c

    r3171 r3235  
    600600 * will get a non-encoded version of the data. A small difference will be that 
    601601 * the tny_mime_part_decode_to_stream() will decode certain special characters in 
    602  * TEXT/* mime parts (character set encoding) to UTF-8. 
     602 * TEXT mime parts (character set encoding) to UTF-8. 
    603603 * 
    604604 * However. A larger difference happens with binary mime parts that where not 
     
    652652 * received using FETCH BODY and the data is encoded in a known encoding 
    653653 * (like BASE 64, QUOTED-PRINTED, UUENCODED, etc), the data will be decoded 
    654  * before delivered to @stream. TEXT/* mime parts will also enjoy character set 
     654 * before delivered to @stream. TEXT mime parts will also enjoy character set 
    655655 * decoding. 
    656656 * 
  • trunk/libtinymailui-gtk/tny-gtk-folder-store-tree-model.c

    r3228 r3235  
    4343 
    4444#include <config.h> 
     45#include <string.h> 
    4546 
    4647#include <glib.h> 
     
    113114        TnyIterator *iter; 
    114115        TnyList *folders = tny_simple_list_new (); 
    115         TnyGtkFolderStoreTreeModel *me = (TnyGtkFolderStoreTreeModel*) self; 
    116116 
    117117        /* TODO add error checking and reporting here */ 
     
    524524{ 
    525525        TnyGtkFolderStoreTreeModel *me = (TnyGtkFolderStoreTreeModel*) object; 
    526         GList *copy = me->fol_obs; 
    527526/* 
    528527        if (me->signal1 != -1) 
     
    923922creater (GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *in_iter, gpointer user_data) 
    924923{ 
    925         TnyGtkFolderStoreTreeModel *me = (TnyGtkFolderStoreTreeModel*) model; 
    926924        TnyGtkFolderStoreTreeModel *self = (TnyGtkFolderStoreTreeModel*) model; 
    927925        TnyFolderStore *fol = NULL; 
     
    10701068        TnyFolderStoreChangeChanged changed = tny_folder_store_change_get_changed (change); 
    10711069        GtkTreeModel *model = GTK_TREE_MODEL (self); 
    1072         TnyGtkFolderStoreTreeModel *me = (TnyGtkFolderStoreTreeModel*) self; 
    10731070 
    10741071        if (changed & TNY_FOLDER_STORE_CHANGE_CHANGED_CREATED_FOLDERS) { 
  • trunk/libtinymailui-gtk/tny-gtk-msg-view.c

    r3163 r3235  
    466466 
    467467        /* Attachments */ 
    468         } else if (priv->display_attachments && tny_mime_part_is_attachment (part) ||  
     468        } else if ((priv->display_attachments && tny_mime_part_is_attachment (part)) ||  
    469469                (priv->display_rfc822 && (tny_mime_part_content_type_is (part, "message/rfc822")))) 
    470470        {