summaryrefslogtreecommitdiff
path: root/gcc/ada/g-os_lib.adb
diff options
context:
space:
mode:
authorArnaud Charlet <charlet@gcc.gnu.org>2004-12-08 12:46:45 +0100
committerArnaud Charlet <charlet@gcc.gnu.org>2004-12-08 12:46:45 +0100
commit2fb9c1bbd4094df3fbf2a598a30052d2d4842693 (patch)
treeee5ee6ddd2506c84e0b7441228ab52861a131730 /gcc/ada/g-os_lib.adb
parent5f8abbd98b87a4dd80586a164d7f3b8eb81aa691 (diff)
downloadgcc-2fb9c1bbd4094df3fbf2a598a30052d2d4842693.tar.gz
g-os_lib.adb (Spawn): Explicitly initialize Saved_Error to avoid a compile-time warning.
* g-os_lib.adb (Spawn): Explicitly initialize Saved_Error to avoid a compile-time warning. From-SVN: r91886
Diffstat (limited to 'gcc/ada/g-os_lib.adb')
-rw-r--r--gcc/ada/g-os_lib.adb6
1 files changed, 5 insertions, 1 deletions
diff --git a/gcc/ada/g-os_lib.adb b/gcc/ada/g-os_lib.adb
index 2513d6682d0..64122462ec4 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