public inbox for cygwin-cvs@sourceware.org
help / color / mirror / Atom feed
* [newlib-cygwin] Cygwin: avoid GCC 8.3 errors with -Werror=class-memaccess
@ 2019-07-17 15:09 Ken Brown
0 siblings, 0 replies; only message in thread
From: Ken Brown @ 2019-07-17 15:09 UTC (permalink / raw)
To: cygwin-cvs
https://sourceware.org/git/gitweb.cgi?p=newlib-cygwin.git;h=f0cf44dc7d98d751483a91869949d58f55531e6f
commit f0cf44dc7d98d751483a91869949d58f55531e6f
Author: Ken Brown <kbrown@cornell.edu>
Date: Mon Jul 15 14:22:07 2019 -0400
Cygwin: avoid GCC 8.3 errors with -Werror=class-memaccess
Diff:
---
winsup/cygwin/flock.cc | 2 +-
winsup/cygwin/path.cc | 4 ++--
winsup/cygwin/path.h | 2 +-
winsup/cygwin/pinfo.cc | 4 ++--
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/winsup/cygwin/flock.cc b/winsup/cygwin/flock.cc
index 860791d..74374d7 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 158f1e5..8da858d 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 0c94c61..69af5a0 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 d002268..cdbd8bd 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)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2019-07-17 15:09 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-17 15:09 [newlib-cygwin] Cygwin: avoid GCC 8.3 errors with -Werror=class-memaccess Ken Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).