Initializing orig_err avoids a warning: "may be used uninitialized".

2020-09-14  Torbjörn SVENSSON <torbjorn.svens...@st.com>
        Christophe Lyon  <christophe.l...@linaro.org>

        libiberty/
        * pex-win32 (pex_win32_exec_child): Initialize orig_err.
---
 libiberty/pex-win32.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libiberty/pex-win32.c b/libiberty/pex-win32.c
index 331067b..f5fafaa 100644
--- a/libiberty/pex-win32.c
+++ b/libiberty/pex-win32.c
@@ -771,7 +771,7 @@ pex_win32_exec_child (struct pex_obj *obj ATTRIBUTE_UNUSED, 
int flags,
   OSVERSIONINFO version_info;
   STARTUPINFO si;
   PROCESS_INFORMATION pi;
-  int orig_out, orig_in, orig_err;
+  int orig_out, orig_in, orig_err = 0;
   BOOL separate_stderr = !(flags & PEX_STDERR_TO_STDOUT);
 
   /* Ensure we have inheritable descriptors to pass to the child.  */
-- 
2.7.4

Reply via email to