From: Christopher Faylor Date: Wed, 26 Jan 2005 18:21:22 +0000 (+0000) Subject: * pinfo.cc (pinfo::init): Avoid a compiler warning. X-Git-Tag: binutils-2_16-branchpoint~143 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=325eadaa57b3eaac4ef3547144f7747f7e7ec63d;p=newlib-cygwin.git * pinfo.cc (pinfo::init): Avoid a compiler warning. --- diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index babb9f846..7ee641fe3 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,7 @@ +2005-01-26 Christopher Faylor + + * pinfo.cc (pinfo::init): Avoid a compiler warning. + 2005-01-25 Corinna Vinschen * syscalls.cc (setpriority): Implement PRIO_PGRP, PRIO_USER and diff --git a/winsup/cygwin/pinfo.cc b/winsup/cygwin/pinfo.cc index 76386ae3f..2159f2005 100644 --- a/winsup/cygwin/pinfo.cc +++ b/winsup/cygwin/pinfo.cc @@ -179,7 +179,7 @@ pinfo::init (pid_t n, DWORD flag, HANDLE h0) void *mapaddr; bool createit = !!(flag & (PID_IN_USE | PID_EXECED)); - bool created; + bool created = false; DWORD access = FILE_MAP_READ | (flag & (PID_IN_USE | PID_EXECED | PID_MAP_RW) ? FILE_MAP_WRITE : 0); @@ -189,7 +189,6 @@ pinfo::init (pid_t n, DWORD flag, HANDLE h0) { /* Try to enforce that myself is always created in the same place */ mapaddr = open_shared (NULL, 0, h0, 0, SH_MYSELF); - created = false; if (h0 == INVALID_HANDLE_VALUE) h0 = NULL; }