Commit cdf31d94 cdf31d94a3dd6c5bf76d44fe21caaeaa587d82b3 by Sam Roberts

Corrected type mismatches visible on 64-bit systems.

1 parent 88bd58a0
......@@ -52,7 +52,7 @@ imap4d_copy0 (char *arg, int isuid, char *resp, size_t resplen)
const char *delim = "/";
char *sp = NULL;
size_t *set = NULL;
size_t n = 0;
int n = 0;
mailbox_t cmbox = NULL;
msgset = util_getword (arg, &sp);
......
......@@ -43,7 +43,8 @@ imap4d_store0 (char *arg, int isuid, char *resp, size_t resplen)
char *sp = NULL;
int status;
int ack = 0;
size_t i, n = 0;
size_t i;
int n = 0;
size_t *set = NULL;
enum value_type { STORE_SET, STORE_ADD, STORE_UNSET } how;
......
......@@ -566,7 +566,7 @@ sc2string (int rc)
static int
add2set (size_t **set, int *n, unsigned long val)
{
int *tmp;
size_t *tmp;
tmp = realloc (*set, (*n + 1) * sizeof (**set));
if (tmp == NULL)
{
......
......@@ -29,7 +29,7 @@ strchrnul (s, c_in)
const char *s;
int c_in;
{
const unsigned char *char_ptr;
const char *char_ptr;
const unsigned long int *longword_ptr;
unsigned long int longword, magic_bits, charmask;
unsigned char c;
......
......@@ -21,7 +21,7 @@
mailbox_t mbox;
unsigned int cursor;
unsigned int realcursor;
unsigned int total;
size_t total;
FILE *ofile;
int interactive;
......
......@@ -26,6 +26,9 @@
# include <dmalloc.h>
#endif
#ifdef HAVE_ALLOCA_H
# include <alloca.h>
#endif
#include <errno.h>
#include <stdio.h>
#include <stdlib.h>
......@@ -127,7 +130,7 @@ struct message_set
extern mailbox_t mbox;
extern unsigned int cursor;
extern unsigned int realcursor;
extern unsigned int total;
extern size_t total;
extern FILE *ofile;
extern int interactive;
extern const struct mail_command_entry mail_command_table[];
......
......@@ -254,7 +254,7 @@ mail_send0 (struct send_environ *env, int save_to)
else
{
char *buf = NULL;
unsigned int n;
size_t n;
rewind (env->file);
while (getline (&buf, &n, env->file) > 0)
fputs (buf, fp);
......@@ -428,7 +428,7 @@ msg_to_pipe (const char *cmd, message_t msg)
stream_t stream = NULL;
char buffer[512];
off_t off = 0;
unsigned int n = 0;
size_t n = 0;
message_get_stream (msg, &stream);
while (stream_read (stream, buffer, sizeof buffer - 1, off, &n) == 0
&& n != 0)
......
......@@ -28,7 +28,7 @@ mail_size (int argc, char **argv)
util_msglist_command (mail_size, argc, argv, 1);
else
{
unsigned int s = 0;
size_t s = 0;
message_t msg;
if (mailbox_get_message (mbox, cursor, &msg) != 0)
{
......
......@@ -832,7 +832,7 @@ util_descend_subparts (message_t mesg, msgset_t *msgset, message_t *part)
for (i = 1; i < msgset->npart; i++)
{
message_t submsg = NULL;
unsigned int nparts = 0;
size_t nparts = 0;
char *type = NULL;
header_t hdr = NULL;
......
......@@ -96,7 +96,7 @@ messages_count (const char *box)
{
mailbox_t mbox;
url_t url = NULL;
int count;
size_t count;
if (mailbox_create_default (&mbox, box) != 0)
{
......