diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc index 860791d7b..74374d727 100644 --- a/winsup/cygwin/flock.cc +++ b/winsup/cygwin/flock.cc @@ -1736,7 +1736,7 @@ lf_split (lockf_t *lock1, lockf_t *lock2, lockf_t **split) splitlock = *split; assert (splitlock != NULL); *split = splitlock->lf_next; - memcpy (splitlock, lock1, sizeof *splitlock); + memcpy ((void *) splitlock, lock1, sizeof *splitlock); /* We have to unset the obj HANDLE here which has been copied by the above memcpy, so that the calling function recognizes the new object. See post-lf_split handling in lf_setlock and lf_clearlock. */ diff --git a/winsup/cygwin/path.cc b/winsup/cygwin/path.cc index 158f1e5fb..8da858da1 100644 --- a/winsup/cygwin/path.cc +++ b/winsup/cygwin/path.cc @@ -1299,7 +1299,7 @@ path_conv::serialize (HANDLE h, unsigned int &n) const n = 0; return NULL; } - memcpy (&pcf->pc, this, sizeof *this); + memcpy ((void *) &pcf->pc, this, sizeof *this); pcf->hdl = h; pcf->name_len = nlen; pcf->posix_len = plen; @@ -1318,7 +1318,7 @@ path_conv::deserialize (void *bufp) char *p; HANDLE ret; - memcpy (this, &pcf->pc, sizeof *this); + memcpy ((void *) this, &pcf->pc, sizeof *this); wide_path = uni_path.Buffer = NULL; uni_path.MaximumLength = uni_path.Length = 0; path = posix_path = NULL; diff --git a/winsup/cygwin/path.h b/winsup/cygwin/path.h index 0c94c6152..69af5a01c 100644 --- a/winsup/cygwin/path.h +++ b/winsup/cygwin/path.h @@ -313,7 +313,7 @@ class path_conv path_conv& eq_worker (const path_conv& pc, const char *in_path) { free_strings (); - memcpy (this, &pc, sizeof pc); + memcpy ((void *) this, &pc, sizeof pc); /* The device info might contain pointers to allocated strings, in contrast to statically allocated strings. Calling device::dup() will duplicate the string if the source was allocated. */ diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index d002268ed..cdbd8bd7e 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -1418,12 +1418,12 @@ winpids::add (DWORD& nelem, bool winpid, DWORD pid) { npidlist += slop_pidlist; pidlist = (DWORD *) realloc (pidlist, size_pidlist (npidlist + 1)); - pinfolist = (pinfo *) realloc (pinfolist, size_pinfolist (npidlist + 1)); + pinfolist = (pinfo *) realloc ((void *) pinfolist, size_pinfolist (npidlist + 1)); } _onreturn onreturn; pinfo& p = pinfolist[nelem]; - memset (&p, 0, sizeof (p)); + memset ((void *) &p, 0, sizeof (p)); bool perform_copy; if (cygpid == myself->pid)