From 30dd54286bf994015d578fc3c111002c12e6f21a Mon Sep 17 00:00:00 2001 From: Nate Straz Date: Thu, 16 Nov 2006 19:34:26 +0000 Subject: Cast off_t variables to long long int when printing so we don't get the ugly warnings. We should always be compiling with 64-bit off_t's so this should not be a problem. Change nread and nwrote back to ssize_t's since that is what read and write return. nleft remains an off_t because we initialize to stat.st_size. --- qacp.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'qacp.c') diff --git a/qacp.c b/qacp.c index ed5a973..4e809cd 100644 --- a/qacp.c +++ b/qacp.c @@ -226,9 +226,8 @@ qacp_recvonefile(const char *host, const char *srcfile, const char *destfile) int insd; int outfd; char buf[BUFSIZ]; - ssize_t nread; - ssize_t nwrote; - ssize_t nleft; + ssize_t nread, nwrote; + off_t nleft; struct qp_rstat_pkt *rstatp; int rstaterrno; @@ -284,8 +283,9 @@ qacp_recvonefile(const char *host, const char *srcfile, const char *destfile) if (nleft != 0) { unlink(destfile); fprintf(stderr, "Short file transfer of %s, " - "%lld bytes lost, wanted %lld\n", srcfile, nleft, - rstatp->qp_st_size); + "%lld bytes lost, wanted %lld\n", srcfile, + (long long int)nleft, + (long long int)rstatp->qp_st_size); } close(sd); -- cgit