From 178fb764cf7835f3e0090b1a970742678333f8af Mon Sep 17 00:00:00 2001 From: Sunil Nimmagadda Date: Mon, 7 Apr 2014 12:27:40 +0500 Subject: Fix clang warnings. offset is always long. --- maildir.c | 6 +++--- mbox.c | 4 ++-- pop3d.h | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/maildir.c b/maildir.c index 1b11410..a0bca6a 100644 --- a/maildir.c +++ b/maildir.c @@ -30,7 +30,7 @@ #include "pop3d.h" static int init(struct mdrop *, size_t *, size_t *); -static int retr(struct mdrop *, unsigned int, size_t *, size_t *); +static int retr(struct mdrop *, unsigned int, size_t *, long *); static int update(struct mdrop *); static int new_to_cur(struct mdrop *); static int msgcmp(struct msg *, struct msg *); @@ -51,7 +51,7 @@ init(struct mdrop *m, size_t *nmsgs, size_t *sz) { SHA1_CTX ctx; struct stat sb; - char buf[MAXBSIZE]; + u_char buf[MAXBSIZE]; DIR *dirp; struct dirent *dp; struct msg *msg; @@ -170,7 +170,7 @@ new_to_cur(struct mdrop *m) } static int -retr(struct mdrop *m, unsigned int idx, size_t *nlines, size_t *offset) +retr(struct mdrop *m, unsigned int idx, size_t *nlines, long *offset) { char buf[MAXPATHLEN]; int fd, r; diff --git a/mbox.c b/mbox.c index 83b3d80..a77efd0 100644 --- a/mbox.c +++ b/mbox.c @@ -30,7 +30,7 @@ #include "pop3d.h" static int init(struct mdrop *, size_t *, size_t *); -static int retr(struct mdrop *, unsigned int, size_t *, size_t *); +static int retr(struct mdrop *, unsigned int, size_t *, long *); static int update(struct mdrop *); struct m_backend m_backend_mbox = { @@ -113,7 +113,7 @@ init(struct mdrop *m, size_t *nmsgs, size_t *sz) } static int -retr(struct mdrop *m, unsigned int idx, size_t *nlines, size_t *offset) +retr(struct mdrop *m, unsigned int idx, size_t *nlines, long *offset) { if (m->msgs_index[idx]->flags & F_DELE) return (-1); diff --git a/pop3d.h b/pop3d.h index f8f6881..5697dbb 100644 --- a/pop3d.h +++ b/pop3d.h @@ -104,7 +104,7 @@ struct list_res { struct m_backend { int (*init)(struct mdrop *, size_t *, size_t *); - int (*retr)(struct mdrop *, unsigned int, size_t *, size_t *); + int (*retr)(struct mdrop *, unsigned int, size_t *, long *); int (*update)(struct mdrop *); }; -- cgit v1.2.3