From 98d15bdfc7ae70f89f58d46b1727aed19ceaf387 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Tue, 29 Dec 2015 16:04:45 +0100 Subject: fix warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/satd-add.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/satd-add.c') diff --git a/src/satd-add.c b/src/satd-add.c index 90d445c..f1fa4ed 100644 --- a/src/satd-add.c +++ b/src/satd-add.c @@ -65,16 +65,16 @@ main(int argc, char *argv[]) /* Update state file and run hook. */ t (flock(STATE_FILENO, LOCK_EX)); t (fstat(STATE_FILENO, &attr)); - t (r = preadn(STATE_FILENO, &(job->no), sizeof(job->no), 0), r < 0); + t (r = preadn(STATE_FILENO, &(job->no), sizeof(job->no), (size_t)0), r < 0); if (r < (ssize_t)sizeof(job->no)) job->no = 0; else job->no += 1; - t (pwriten(STATE_FILENO, &(job->no), sizeof(job->no), 0) < (ssize_t)sizeof(job->no)); + t (pwriten(STATE_FILENO, &(job->no), sizeof(job->no), (size_t)0) < (ssize_t)sizeof(job->no)); if (attr.st_size < (off_t)sizeof(job->no)) attr.st_size = (off_t)sizeof(job->no); n += sizeof(*job); - t (pwriten(STATE_FILENO, job, n, attr.st_size) < (ssize_t)n); + t (pwriten(STATE_FILENO, job, n, (size_t)(attr.st_size)) < (ssize_t)n); fsync(STATE_FILENO); run_job_or_hook(job, "queued"); t (flock(STATE_FILENO, LOCK_UN)); -- cgit v1.2.3-70-g09d2