From a2f4fc6f3fe2ed458f348dccbab9367a35e6a3a2 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Sat, 30 May 2020 14:01:17 -0400 Subject: [PATCH] [Ada] Fix potentially uninitialized variable flagged by CodePeer gcc/ada/ * libgnat/g-socket.adb (Wait_On_Socket): Fix potentially uninitialized variable. --- gcc/ada/libgnat/g-socket.adb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gcc/ada/libgnat/g-socket.adb b/gcc/ada/libgnat/g-socket.adb index da631e381dc..719d9a96826 100644 --- a/gcc/ada/libgnat/g-socket.adb +++ b/gcc/ada/libgnat/g-socket.adb @@ -2062,8 +2062,11 @@ package body GNAT.Sockets is Close_Selector (S.all); Unchecked_Free (Local_S); end if; + exception when others => + Status := Completed; + if Selector = null then Close_Selector (S.all); Unchecked_Free (Local_S); -- 2.30.2