From: Arnaud Charlet Date: Sat, 30 May 2020 18:01:17 +0000 (-0400) Subject: [Ada] Fix potentially uninitialized variable flagged by CodePeer X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=a2f4fc6f3fe2ed458f348dccbab9367a35e6a3a2;p=gcc.git [Ada] Fix potentially uninitialized variable flagged by CodePeer gcc/ada/ * libgnat/g-socket.adb (Wait_On_Socket): Fix potentially uninitialized variable. --- 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);