aboutsummaryrefslogtreecommitdiffstats
path: root/src/daemon.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@member.fsf.org>2015-12-29 16:04:45 +0100
committerMattias Andrée <maandree@member.fsf.org>2015-12-29 16:04:45 +0100
commit98d15bdfc7ae70f89f58d46b1727aed19ceaf387 (patch)
tree762d155dcd0865a0fda43b70fe490be85beee994 /src/daemon.c
parentadd build system + add news file + update deps (diff)
downloadsat-98d15bdfc7ae70f89f58d46b1727aed19ceaf387.tar.gz
sat-98d15bdfc7ae70f89f58d46b1727aed19ceaf387.tar.bz2
sat-98d15bdfc7ae70f89f58d46b1727aed19ceaf387.tar.xz
fix warnings
Signed-off-by: Mattias Andrée <maandree@member.fsf.org>
Diffstat (limited to '')
-rw-r--r--src/daemon.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/daemon.c b/src/daemon.c
index 6402473..a8278c4 100644
--- a/src/daemon.c
+++ b/src/daemon.c
@@ -44,7 +44,7 @@ extern char **environ;
char *buffer = buf; \
ssize_t r, n = 0; \
while (nbyte) { \
- r = FUN(fildes, buffer, nbyte, offset); \
+ r = FUN(fildes, buffer, nbyte, (off_t)offset); \
if (r < 0) return -1; \
if (r == 0) break; \
n += r; \
@@ -150,7 +150,7 @@ restore_array(char *buf, size_t len, size_t *n)
{
char **rc = malloc((len + 1) * sizeof(char*));
char **new = NULL;
- size_t i, e = 0;
+ size_t i = 0, e = 0;
t (!rc);
while (i < len) {
rc[e++] = buf + i;
@@ -346,7 +346,7 @@ found_it:
t (!(buf = malloc(n)));
t (r = preadn(STATE_FILENO, buf, n, off + sizeof(job) + job.n), r < 0);
t (pwriten(STATE_FILENO, buf, (size_t)r, off) < 0);
- t (ftruncate(STATE_FILENO, (size_t)r + off));
+ t (ftruncate(STATE_FILENO, (off_t)r + (off_t)off));
free(buf), buf = NULL;
fsync(STATE_FILENO);