Keith,
without knowing too much about your environment, here goes.
This is not very pretty since we now actually "care" about return
value, but does it work?!? :-)
commit 0e5d281a6b93c781091e902441579f79d9621c2e
Author: Johan Bergström <
bu...@bergstroem.nu>
Date: Thu Nov 26 21:15:17 2009 +0100
Another stab at fixing ftruncate warnings. This time it gets ugly
diff --git a/binlog.c b/binlog.c
index 377eac9..56675f8 100644
--- a/binlog.c
+++ b/binlog.c
@@ -259,9 +259,10 @@ binlog_read_log_file(binlog b, job binlog_jobs)
static void
binlog_close(binlog b)
{
+ int unused;
if (!b) return;
if (b->fd < 0) return;
- if (b->free) (void) ftruncate(b->fd, lseek(b->fd, b->free,
SEEK_END));
+ if (b->free) unused = ftruncate(b->fd, lseek(b->fd, b->free,
SEEK_END));
close(b->fd);
b->fd = -1;
binlog_dref(b);