[Ada] Fix potentially uninitialized variable flagged by CodePeer
authorArnaud Charlet <charlet@adacore.com>
Sat, 30 May 2020 18:01:17 +0000 (14:01 -0400)
committerPierre-Marie de Rodat <derodat@adacore.com>
Wed, 15 Jul 2020 13:42:33 +0000 (09:42 -0400)
gcc/ada/

* libgnat/g-socket.adb (Wait_On_Socket): Fix potentially
uninitialized variable.

gcc/ada/libgnat/g-socket.adb

index da631e3..719d9a9 100644 (file)
@@ -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);