diff options
author | Mattias Andrée <maandree@member.fsf.org> | 2015-12-29 16:04:45 +0100 |
---|---|---|
committer | Mattias Andrée <maandree@member.fsf.org> | 2015-12-29 16:04:45 +0100 |
commit | 98d15bdfc7ae70f89f58d46b1727aed19ceaf387 (patch) | |
tree | 762d155dcd0865a0fda43b70fe490be85beee994 /src/satd-add.c | |
parent | add build system + add news file + update deps (diff) | |
download | sat-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 'src/satd-add.c')
-rw-r--r-- | src/satd-add.c | 6 |
1 files changed, 3 insertions, 3 deletions
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)); |