Fix clang warnings. offset is always long.
--- a/maildir.c Wed Apr 02 14:44:04 2014 +0500
+++ b/maildir.c Mon Apr 07 12:28:10 2014 +0500
@@ -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 @@
{
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 @@
}
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;
--- a/mbox.c Wed Apr 02 14:44:04 2014 +0500
+++ b/mbox.c Mon Apr 07 12:28:10 2014 +0500
@@ -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 @@
}
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);
--- a/pop3d.h Wed Apr 02 14:44:04 2014 +0500
+++ b/pop3d.h Mon Apr 07 12:28:10 2014 +0500
@@ -104,7 +104,7 @@
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 *);
};