diff options
author | Christopher James Lahey <clahey@helixcode.com> | 2000-08-11 10:57:11 +0800 |
---|---|---|
committer | Chris Lahey <clahey@src.gnome.org> | 2000-08-11 10:57:11 +0800 |
commit | 40eea3692e4afa02a9092f64c00e9348f562f68b (patch) | |
tree | a5de1982e43949eefeea75ab5a939a89690b32d4 /camel/camel-mime-part-utils.c | |
parent | e8ee5b65d43775708361a1094d56ae7d20fbb5e7 (diff) | |
download | gsoc2013-evolution-40eea3692e4afa02a9092f64c00e9348f562f68b.tar gsoc2013-evolution-40eea3692e4afa02a9092f64c00e9348f562f68b.tar.gz gsoc2013-evolution-40eea3692e4afa02a9092f64c00e9348f562f68b.tar.bz2 gsoc2013-evolution-40eea3692e4afa02a9092f64c00e9348f562f68b.tar.lz gsoc2013-evolution-40eea3692e4afa02a9092f64c00e9348f562f68b.tar.xz gsoc2013-evolution-40eea3692e4afa02a9092f64c00e9348f562f68b.tar.zst gsoc2013-evolution-40eea3692e4afa02a9092f64c00e9348f562f68b.zip |
Fixed some warnings.
2000-08-10 Christopher James Lahey <clahey@helixcode.com>
* camel-folder-search.c, camel-folder-summary.c, camel-medium.c,
camel-mime-filter-charset.c, camel-mime-filter.c,
camel-mime-filter.h, camel-mime-message.c, camel-mime-parser.c,
camel-mime-part-utils.c, camel-mime-part.c, camel-mime-utils.c,
camel-movemail.c, camel-multipart.c, camel-object.c,
camel-stream-mem.c, providers/mbox/camel-mbox-folder.c,
providers/mbox/camel-mbox-summary.c,
providers/mh/camel-mh-folder.c,
providers/smtp/camel-smtp-transport.c: Fixed some warnings.
svn path=/trunk/; revision=4719
Diffstat (limited to 'camel/camel-mime-part-utils.c')
-rw-r--r-- | camel/camel-mime-part-utils.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/camel/camel-mime-part-utils.c b/camel/camel-mime-part-utils.c index 68b1f1da75..646b0131b1 100644 --- a/camel/camel-mime-part-utils.c +++ b/camel/camel-mime-part-utils.c @@ -44,12 +44,12 @@ simple_data_wrapper_construct_from_parser(CamelDataWrapper *dw, CamelMimeParser GByteArray *buffer; char *buf; int len; - off_t start, end; /* ignore the start may be used unitialised warning */ + off_t start = 0, end; CamelMimeFilter *fdec = NULL, *fcrlf = NULL, *fch = NULL; struct _header_content_type *ct; - int decid=-1, crlfid=-1, chrid=-1, cache=TRUE; + int decid=-1, crlfid=-1, chrid=-1; CamelStream *source; - CamelSeekableStream *seekable_source; /* and ignore the warning about this one too. */ + CamelSeekableStream *seekable_source = NULL; char *encoding; d(printf("constructing data-wrapper\n")); @@ -64,7 +64,6 @@ simple_data_wrapper_construct_from_parser(CamelDataWrapper *dw, CamelMimeParser camel_object_ref((CamelObject *)source); if (CAMEL_IS_SEEKABLE_STREAM (source)) { seekable_source = CAMEL_SEEKABLE_STREAM (source); - cache = FALSE; } } @@ -111,12 +110,12 @@ simple_data_wrapper_construct_from_parser(CamelDataWrapper *dw, CamelMimeParser buffer = g_byte_array_new(); - if (!cache) { + if (seekable_source /* !cache */) { start = camel_mime_parser_tell(mp) + seekable_source->bound_start; } while ( camel_mime_parser_step(mp, &buf, &len) != HSCAN_BODY_END ) { if (buffer) { - if (buffer->len > 20480 && !cache) { + if (buffer->len > 20480 && seekable_source) { /* is this a 'big' message? Yes? We dont want to convert it all then.*/ camel_mime_parser_filter_remove(mp, decid); camel_mime_parser_filter_remove(mp, chrid); @@ -203,7 +202,9 @@ camel_mime_part_construct_content_from_parser(CamelMimePart *dw, CamelMimeParser case HSCAN_MULTIPART: { CamelDataWrapper *bodypart; +#ifndef NO_WARNINGS #warning This should use a camel-mime-multipart +#endif d(printf("Creating multi-part\n")); content = (CamelDataWrapper *)camel_multipart_new(); @@ -223,7 +224,9 @@ camel_mime_part_construct_content_from_parser(CamelMimePart *dw, CamelMimeParser g_warning("Invalid state encountered???: %d", camel_mime_parser_state(mp)); } if (content) { +#ifndef NO_WARNINGS #warning there just has got to be a better way ... to transfer the mime-type to the datawrapper +#endif /* would you believe you have to set this BEFORE you set the content object??? oh my god !!!! */ camel_data_wrapper_set_mime_type_field (content, camel_mime_part_get_content_type ((CamelMimePart *)dw)); |