diff options
author | Mark Murray <markm@FreeBSD.org> | 2002-07-03 16:35:20 +0000 |
---|---|---|
committer | Mark Murray <markm@FreeBSD.org> | 2002-07-03 16:35:20 +0000 |
commit | 7ede89e44b46d0768ec0a84daf6deba25732d8e9 (patch) | |
tree | f4d895e73e5b08d4d5c30ef86fd743c26398279b /bin/cp | |
parent | 4d7d5e7c112d468eee4bce835138b3e1d057995e (diff) | |
download | src-7ede89e44b46d0768ec0a84daf6deba25732d8e9.tar.gz src-7ede89e44b46d0768ec0a84daf6deba25732d8e9.zip |
Fix some low-hanging lint-fruit: endianness and staticness warnings.
Notes
Notes:
svn path=/head/; revision=99363
Diffstat (limited to 'bin/cp')
-rw-r--r-- | bin/cp/cp.c | 4 | ||||
-rw-r--r-- | bin/cp/utils.c | 6 |
2 files changed, 6 insertions, 4 deletions
diff --git a/bin/cp/cp.c b/bin/cp/cp.c index 2df306987ef9..ba790182e6ee 100644 --- a/bin/cp/cp.c +++ b/bin/cp/cp.c @@ -91,8 +91,8 @@ static int Rflag, rflag, vflag; enum op { FILE_TO_FILE, FILE_TO_DIR, DIR_TO_DNE }; -int copy(char *[], enum op, int); -int mastercmp(const FTSENT **, const FTSENT **); +static int copy(char *[], enum op, int); +static int mastercmp(const FTSENT **, const FTSENT **); int main(int argc, char *argv[]) diff --git a/bin/cp/utils.c b/bin/cp/utils.c index f894c00918f4..a10daa9dfa8b 100644 --- a/bin/cp/utils.c +++ b/bin/cp/utils.c @@ -62,7 +62,9 @@ copy_file(FTSENT *entp, int dne) { static char buf[MAXBSIZE]; struct stat *fs; - int ch, checkch, from_fd, rcount, rval, to_fd, wcount, wresid; + int ch, checkch, from_fd, rcount, rval, to_fd; + ssize_t wcount; + size_t wresid; char *bufp; #ifdef VM_AND_BUFFER_CACHE_SYNCHRONIZED char *p; @@ -132,7 +134,7 @@ copy_file(FTSENT *entp, int dne) rval = 1; } else { for (bufp = p, wresid = fs->st_size; ; - bufp += wcount, wresid -= wcount) { + bufp += wcount, wresid -= (size_t)wcount) { wcount = write(to_fd, bufp, wresid); if (wcount >= wresid || wcount <= 0) break; |