Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Foley <pefoley2@pefoley.com>2016-03-19 20:45:56 +0300
committerCorinna Vinschen <corinna@vinschen.de>2016-03-20 14:31:42 +0300
commit5bc753c5a2708173c77f0162d644b31707b049a0 (patch)
treebb14cc99d58fcbcfad3a6df7e2835bf15f763528 /winsup/cygwin/pinfo.cc
parent0611132f045ee705ab8f85d0679aeacde0720f33 (diff)
Fix strict aliasing
Fix a strict aliasing error detected by gcc 6.0+ winsup/cygwin/ChangeLog * pinfo.cc (winpids::enum_process): Fix strict aliasing. Signed-off-by: Peter Foley <pefoley2@pefoley.com>
Diffstat (limited to 'winsup/cygwin/pinfo.cc')
-rw-r--r--winsup/cygwin/pinfo.cc3
1 files changed, 1 insertions, 2 deletions
diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc
index 23861e5eb..d4b2afb3d 100644
--- a/winsup/cygwin/pinfo.cc
+++ b/winsup/cygwin/pinfo.cc
@@ -1391,14 +1391,13 @@ winpids::enum_processes (bool winpid)
}
PSYSTEM_PROCESS_INFORMATION px = procs;
- char *&pxc = (char *&)px;
while (1)
{
if (px->UniqueProcessId)
add (nelem, true, (DWORD) (uintptr_t) px->UniqueProcessId);
if (!px->NextEntryOffset)
break;
- pxc += px->NextEntryOffset;
+ px = (PSYSTEM_PROCESS_INFORMATION) ((char *) px + px->NextEntryOffset);
}
}
return nelem;