[evolution-patches] Compilation warning fixes for camel-mime-filter-basic.c
- From: Philip Van Hoof <spam pvanhoof be>
- To: evolution-patches gnome org
- Subject: [evolution-patches] Compilation warning fixes for camel-mime-filter-basic.c
- Date: Tue, 17 Oct 2006 10:20:04 +0200
Trying to get work upstream
have fun
--
Philip Van Hoof, software developer
home: me at pvanhoof dot be
gnome: pvanhoof at gnome dot org
work: vanhoof at x-tend dot be
blog: http://pvanhoof.be/blog
--- camel-mime-filter-basic.c 2006-10-17 10:17:48.000000000 +0200
+++ /home/pvanhoof/repos/gnome/cvs/evolution-data-server/camel/camel-mime-filter-basic.c 2006-04-12 21:14:13.000000000 +0200
@@ -101,38 +101,38 @@
case CAMEL_MIME_FILTER_BASIC_BASE64_ENC:
/* wont go to more than 2x size (overly conservative) */
camel_mime_filter_set_size(mf, len*2+6, FALSE);
- newlen = camel_base64_encode_close((unsigned char *)in, len, TRUE, (unsigned char*)mf->outbuf, &f->state, &f->save);
+ newlen = camel_base64_encode_close(in, len, TRUE, mf->outbuf, &f->state, &f->save);
g_assert(newlen <= len*2+6);
break;
case CAMEL_MIME_FILTER_BASIC_QP_ENC:
/* *4 is definetly more than needed ... */
camel_mime_filter_set_size(mf, len*4+4, FALSE);
- newlen = camel_quoted_encode_close((unsigned char *)in, len, (unsigned char*)mf->outbuf, &f->state, &f->save);
+ newlen = camel_quoted_encode_close(in, len, mf->outbuf, &f->state, &f->save);
g_assert(newlen <= len*4+4);
break;
case CAMEL_MIME_FILTER_BASIC_UU_ENC:
/* won't go to more than 2 * (x + 2) + 62 */
camel_mime_filter_set_size (mf, (len + 2) * 2 + 62, FALSE);
- newlen = camel_uuencode_close ((unsigned char *)in, len, (unsigned char*)mf->outbuf, f->uubuf, &f->state, (guint32*) &f->save);
+ newlen = camel_uuencode_close (in, len, mf->outbuf, f->uubuf, &f->state, &f->save);
g_assert (newlen <= (len + 2) * 2 + 62);
break;
case CAMEL_MIME_FILTER_BASIC_BASE64_DEC:
/* output can't possibly exceed the input size */
camel_mime_filter_set_size(mf, len, FALSE);
- newlen = camel_base64_decode_step((unsigned char *)in, len, (unsigned char*)mf->outbuf, &f->state, (guint32*) &f->save);
+ newlen = camel_base64_decode_step(in, len, mf->outbuf, &f->state, &f->save);
g_assert(newlen <= len);
break;
case CAMEL_MIME_FILTER_BASIC_QP_DEC:
/* output can't possibly exceed the input size, well unless its not really qp, then +2 max */
camel_mime_filter_set_size(mf, len+2, FALSE);
- newlen = camel_quoted_decode_step((unsigned char *)in, len, (unsigned char*)mf->outbuf, &f->state, (gint*) &f->save);
+ newlen = camel_quoted_decode_step(in, len, mf->outbuf, &f->state, &f->save);
g_assert(newlen <= len+2);
break;
case CAMEL_MIME_FILTER_BASIC_UU_DEC:
if ((f->state & CAMEL_UUDECODE_STATE_BEGIN) && !(f->state & CAMEL_UUDECODE_STATE_END)) {
/* "begin <mode> <filename>\n" has been found, so we can now start decoding */
camel_mime_filter_set_size (mf, len + 3, FALSE);
- newlen = camel_uudecode_step ((unsigned char *)in, len, (unsigned char*)mf->outbuf, &f->state, (guint32*) &f->save);
+ newlen = camel_uudecode_step (in, len, mf->outbuf, &f->state, &f->save);
} else {
newlen = 0;
}
@@ -164,31 +164,31 @@
case CAMEL_MIME_FILTER_BASIC_BASE64_ENC:
/* wont go to more than 2x size (overly conservative) */
camel_mime_filter_set_size(mf, len*2+6, FALSE);
- newlen = camel_base64_encode_step((unsigned char *)in, len, TRUE, (unsigned char*)mf->outbuf, &f->state, (gint*)&f->save);
+ newlen = camel_base64_encode_step(in, len, TRUE, mf->outbuf, &f->state, &f->save);
g_assert(newlen <= len*2+6);
break;
case CAMEL_MIME_FILTER_BASIC_QP_ENC:
/* *4 is overly conservative, but will do */
camel_mime_filter_set_size(mf, len*4+4, FALSE);
- newlen = camel_quoted_encode_step((unsigned char *)in, len, (unsigned char*)mf->outbuf, &f->state, (gint*)&f->save);
+ newlen = camel_quoted_encode_step(in, len, mf->outbuf, &f->state, &f->save);
g_assert(newlen <= len*4+4);
break;
case CAMEL_MIME_FILTER_BASIC_UU_ENC:
/* won't go to more than 2 * (x + 2) + 62 */
camel_mime_filter_set_size (mf, (len + 2) * 2 + 62, FALSE);
- newlen = camel_uuencode_step ((unsigned char *)in, len, (unsigned char*)mf->outbuf, f->uubuf, &f->state, (guint32*)&f->save);
+ newlen = camel_uuencode_step (in, len, mf->outbuf, f->uubuf, &f->state, &f->save);
g_assert (newlen <= (len + 2) * 2 + 62);
break;
case CAMEL_MIME_FILTER_BASIC_BASE64_DEC:
/* output can't possibly exceed the input size */
camel_mime_filter_set_size(mf, len+3, FALSE);
- newlen = camel_base64_decode_step((unsigned char *)in, len, (unsigned char*)mf->outbuf, &f->state, (guint32*)&f->save);
+ newlen = camel_base64_decode_step(in, len, mf->outbuf, &f->state, &f->save);
g_assert(newlen <= len+3);
break;
case CAMEL_MIME_FILTER_BASIC_QP_DEC:
/* output can't possibly exceed the input size */
camel_mime_filter_set_size(mf, len + 2, FALSE);
- newlen = camel_quoted_decode_step((unsigned char *)in, len, (unsigned char*)mf->outbuf, &f->state, (gint*)&f->save);
+ newlen = camel_quoted_decode_step(in, len, mf->outbuf, &f->state, &f->save);
g_assert(newlen <= len + 2);
break;
case CAMEL_MIME_FILTER_BASIC_UU_DEC:
@@ -230,7 +230,7 @@
if ((f->state & CAMEL_UUDECODE_STATE_BEGIN) && !(f->state & CAMEL_UUDECODE_STATE_END)) {
/* "begin <mode> <filename>\n" has been found, so we can now start decoding */
camel_mime_filter_set_size (mf, len + 3, FALSE);
- newlen = camel_uudecode_step ((unsigned char*)in, len, (unsigned char*)mf->outbuf, &f->state, (guint32*)&f->save);
+ newlen = camel_uudecode_step (in, len, mf->outbuf, &f->state, &f->save);
} else {
newlen = 0;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]