From 9018ec3d41f1c922916b14da6bf9003ff92e87c4 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 1 Feb 1996 03:50:06 +0000 Subject: (skip): Change type of parameter #5 from char* to unsigned char* to match type of argument. (copy): Cast first arg in memset call to char* to avoid warnings from SunOS's acc. (copy_simple): Likewise. --- src/dd.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/dd.c b/src/dd.c index 419c1ed34..858d3e964 100644 --- a/src/dd.c +++ b/src/dd.c @@ -109,7 +109,7 @@ static void translate_charset __P ((const unsigned char *new_trans)); static void quit __P ((int code)); static void scanargs __P ((int argc, char **argv)); static void skip __P ((int fdesc, char *file, long int records, - long int blocksize, char *buf)); + long int blocksize, unsigned char *buf)); static void usage __P ((int status)); static void write_output __P ((void)); @@ -411,7 +411,8 @@ main (int argc, char **argv) bytes of the data at a time in BUF, if necessary. */ static void -skip (int fdesc, char *file, long int records, long int blocksize, char *buf) +skip (int fdesc, char *file, long int records, long int blocksize, + unsigned char *buf) { struct stat stats; @@ -563,7 +564,7 @@ copy (void) whatever data we are able to read is followed by zeros. This minimizes data loss. */ if ((conversions_mask & C_SYNC) && (conversions_mask & C_NOERROR)) - memset (ibuf, 0, input_blocksize); + memset ((char *) ibuf, 0, input_blocksize); nread = safe_read (input_fd, ibuf, input_blocksize); @@ -600,7 +601,7 @@ copy (void) { if (!(conversions_mask & C_NOERROR)) /* If C_NOERROR, we zeroed the block before reading. */ - memset (ibuf + nread, 0, input_blocksize - nread); + memset ((char *) (ibuf + nread), 0, input_blocksize - nread); nread = input_blocksize; } } @@ -704,7 +705,7 @@ copy_simple (unsigned char *buf, int nread) if (nfree > nread) nfree = nread; - memcpy (obuf + oc, start, nfree); + memcpy ((char *) (obuf + oc), (char *) start, nfree); nread -= nfree; /* Update the number of bytes left to copy. */ start += nfree; -- cgit v1.2.3-70-g09d2