From 71555fbb73c44693abda1554cd1b29bb1e2ce0b7 Mon Sep 17 00:00:00 2001 From: charlet Date: Wed, 8 Dec 2004 11:46:45 +0000 Subject: [PATCH] * g-os_lib.adb (Spawn): Explicitly initialize Saved_Error to avoid a compile-time warning. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@91886 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ada/g-os_lib.adb | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gcc/ada/g-os_lib.adb b/gcc/ada/g-os_lib.adb index 2513d66..6412246 100644 --- a/gcc/ada/g-os_lib.adb +++ b/gcc/ada/g-os_lib.adb @@ -2157,7 +2157,11 @@ package body GNAT.OS_Lib is pragma Import (C, Dup2, "__gnat_dup2"); Saved_Output : File_Descriptor; - Saved_Error : File_Descriptor; + Saved_Error : File_Descriptor := Invalid_FD; + -- We need to initialize Saved_Error to Invalid_FD to avoid + -- a compiler warning that this variable may be used before + -- it is initialized (which can not happen, but the compiler + -- is not smart enough to figure this out). begin -- Set standard output and error to the temporary file -- 2.7.4