From 65445cc442231a3944ff1d66975fe50ec142c99e Mon Sep 17 00:00:00 2001 From: cem Date: Fri, 15 Apr 2016 20:19:32 +0000 Subject: savecore(8): Explicitly cast to fix i386 warning --- sbin/savecore/savecore.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'sbin/savecore/savecore.c') diff --git a/sbin/savecore/savecore.c b/sbin/savecore/savecore.c index 63f4ef2..1d00ed2 100644 --- a/sbin/savecore/savecore.c +++ b/sbin/savecore/savecore.c @@ -506,7 +506,7 @@ DoFile(const char *savedir, const char *device) } } if (lseek(fd, lasthd, SEEK_SET) != lasthd || - read(fd, temp, sectorsize) != sectorsize) { + read(fd, temp, sectorsize) != (ssize_t)sectorsize) { syslog(LOG_ERR, "error reading last dump header at offset %lld in %s: %m", (long long)lasthd, device); @@ -584,7 +584,7 @@ DoFile(const char *savedir, const char *device) dumpsize = dtoh64(kdhl.dumplength); firsthd = lasthd - dumpsize - sectorsize; if (lseek(fd, firsthd, SEEK_SET) != firsthd || - read(fd, temp, sectorsize) != sectorsize) { + read(fd, temp, sectorsize) != (ssize_t)sectorsize) { syslog(LOG_ERR, "error reading first dump header at offset %lld in %s: %m", (long long)firsthd, device); @@ -743,7 +743,7 @@ nuke: memcpy(kdhl.magic, KERNELDUMPMAGIC_CLEARED, sizeof(kdhl.magic)); memcpy(temp, &kdhl, sizeof(kdhl)); if (lseek(fd, lasthd, SEEK_SET) != lasthd || - write(fd, temp, sectorsize) != sectorsize) + write(fd, temp, sectorsize) != (ssize_t)sectorsize) syslog(LOG_ERR, "error while clearing the dump header: %m"); } -- cgit v1.1