Commit 4a69bb5c 4a69bb5ca4d6cf97912eae08de7f4cffc3303c7e by Sam Roberts

Corrected type mismatches visible on 64-bit systems, and including

locker.h, some misc compiler warnings.
1 parent 44e3e0d5
......@@ -316,7 +316,7 @@ base64_encode (const char *iptr, size_t isize, char *optr, size_t osize,
int pad = 0;
const char *b64 =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
const unsigned char* ptr = iptr;
const unsigned char* ptr = (const unsigned char*) iptr;
*nbytes = 0;
if (isize <= 3)
......
......@@ -1183,7 +1183,7 @@ imap_list (f_imap_t f_imap)
}
else if ((status = imap_string (f_imap, &tok)) == 0)
{
size_t sz = 0;
off_t sz = 0;
stream_size (f_imap->string.stream, &sz);
lr->name = calloc (sz + 1, 1);
......
......@@ -144,7 +144,7 @@ struct _f_imap
size_t seq; /* Sequence number to build a tag. */
char *capa; /* Cabilities of the server. */
size_t flags;
int flags;
/* IO use to hold the literal and quoted strings send by
the IMAP server. */
......
......@@ -25,6 +25,7 @@
#include <mailutils/errno.h>
#include <mailutils/error.h>
#include <mailutils/iterator.h>
#include <mailutils/locker.h>
#include <mailutils/registrar.h>
#include <mailbox0.h>
......
......@@ -274,7 +274,7 @@ mailbox_create_default (mailbox_t *pmbox, const char *mail)
if (!mail)
{
if (status = user_mailbox_name (NULL, &tmp_mbox))
if ((status = user_mailbox_name (NULL, &tmp_mbox)))
return status;
mail = tmp_mbox;
}
......
......@@ -49,15 +49,17 @@
# include <strings.h>
#endif
#include <mailbox0.h>
#include <registrar0.h>
#include <mailutils/attribute.h>
#include <mailutils/body.h>
#include <mailutils/errno.h>
#include <mailutils/error.h>
#include <mailutils/header.h>
#include <mailutils/locker.h>
#include <mailutils/message.h>
#include <mailutils/stream.h>
#include <mailutils/body.h>
#include <mailutils/header.h>
#include <mailutils/attribute.h>
#include <mailutils/error.h>
#include <registrar0.h>
#include <mailbox0.h>
#define ATTRIBUTE_IS_DELETED(flag) (flag & MU_ATTRIBUTE_DELETED)
#define ATTRIBUTE_IS_EQUAL(flag1, flag2) (flag1 == flag2)
......
......@@ -258,7 +258,7 @@ sendmail_send_message (mailer_t mailer, message_t msg, address_t from,
else
{
int i = 1;
int count = 0;
size_t count = 0;
address_get_count (to, &count);
......
......@@ -166,7 +166,7 @@ stream_read (stream_t is, char *buf, size_t count,
else
{
size_t residue = count;
int r;
size_t r;
/* If the amount requested is bigger than the buffer cache size,
bypass it. Do no waste time and let it through. */
......