[dovecot-cvs] dovecot/src/lib ibuffer-mmap.c,1.9,1.10 ibuffer.c,1.8,1.9 macros.h,1.7,1.8 md5.c,1.4,1.5 obuffer-file.c,1.14,1.15 write-full.c,1.3,1.4
cras at procontrol.fi
cras at procontrol.fi
Mon Nov 4 09:11:34 EET 2002
Update of /home/cvs/dovecot/src/lib
In directory danu:/tmp/cvs-serv21921/lib
Modified Files:
ibuffer-mmap.c ibuffer.c macros.h md5.c obuffer-file.c
write-full.c
Log Message:
Several minor fixes: signess, casting away const, missing static, etc.
Index: ibuffer-mmap.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/ibuffer-mmap.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -d -r1.9 -r1.10
--- ibuffer-mmap.c 28 Oct 2002 04:33:00 -0000 1.9
+++ ibuffer-mmap.c 4 Nov 2002 07:11:32 -0000 1.10
@@ -35,7 +35,7 @@
int fd;
void *mmap_base;
- uoff_t mmap_offset;
+ off_t mmap_offset;
size_t mmap_block_size;
unsigned int autoclose_fd:1;
@@ -179,8 +179,8 @@
abs_offset = buf->ibuffer.start_offset + v_offset;
if (buf->buffer_size != 0 &&
- mbuf->mmap_offset <= abs_offset &&
- mbuf->mmap_offset + buf->buffer_size > abs_offset) {
+ (uoff_t)mbuf->mmap_offset <= abs_offset &&
+ (uoff_t)mbuf->mmap_offset + buf->buffer_size > abs_offset) {
/* already mmaped */
buf->skip = buf->pos = abs_offset - mbuf->mmap_offset;
} else {
Index: ibuffer.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/ibuffer.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -d -r1.8 -r1.9
--- ibuffer.c 28 Oct 2002 04:33:00 -0000 1.8
+++ ibuffer.c 4 Nov 2002 07:11:32 -0000 1.9
@@ -171,7 +171,7 @@
_buf->w_buffer[i-1] = '\0';
else
_buf->w_buffer[i] = '\0';
- ret_buf = (char *) _buf->buffer + _buf->skip;
+ ret_buf = (char *) _buf->w_buffer + _buf->skip;
i++;
buf->v_offset += i - _buf->skip;
Index: macros.h
===================================================================
RCS file: /home/cvs/dovecot/src/lib/macros.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- macros.h 28 Oct 2002 09:46:02 -0000 1.7
+++ macros.h 4 Nov 2002 07:11:32 -0000 1.8
@@ -38,7 +38,7 @@
#define POINTER_CAST(i) \
((void *) ((char *) NULL + (i)))
#define POINTER_CAST_TO(p, type) \
- ((type) ((char *) (p) - (char *) NULL))
+ ((type) ((const char *) (p) - (const char *) NULL))
/* Define VA_COPY() to do the right thing for copying va_list variables. */
#ifndef VA_COPY
Index: md5.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/md5.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- md5.c 5 Oct 2002 20:09:41 -0000 1.4
+++ md5.c 4 Nov 2002 07:11:32 -0000 1.5
@@ -48,7 +48,7 @@
*/
#if defined(__i386__) || defined(__vax__)
#define SET(n) \
- (*(MD5_u32plus *)&ptr[(n) * 4])
+ (*(const MD5_u32plus *)&ptr[(n) * 4])
#define GET(n) \
SET(n)
#else
@@ -205,7 +205,7 @@
}
memcpy(&ctx->buffer[used], data, free);
- data = (unsigned char *) data + free;
+ data = (const unsigned char *) data + free;
size -= free;
body(ctx, ctx->buffer, 64);
}
Index: obuffer-file.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/obuffer-file.c,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- obuffer-file.c 29 Oct 2002 17:41:41 -0000 1.14
+++ obuffer-file.c 4 Nov 2002 07:11:32 -0000 1.15
@@ -292,7 +292,7 @@
return 1;
}
-int _flush(_OBuffer *buf)
+static int _flush(_OBuffer *buf)
{
FileOBuffer *fbuf = (FileOBuffer *) buf;
int ret;
Index: write-full.c
===================================================================
RCS file: /home/cvs/dovecot/src/lib/write-full.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- write-full.c 8 Sep 2002 13:20:28 -0000 1.3
+++ write-full.c 4 Nov 2002 07:11:32 -0000 1.4
@@ -24,6 +24,7 @@
*/
#include "lib.h"
+#include "write-full.h"
#include <unistd.h>
More information about the dovecot-cvs
mailing list