diff mbox series

[Ada] Warnings on g-spogwa.adb

Message ID 20201027092220.GA33731@adacore.com
State New
Headers show
Series [Ada] Warnings on g-spogwa.adb | expand

Commit Message

Pierre-Marie de Rodat Oct. 27, 2020, 9:22 a.m. UTC
This unit added recently generate legitimate warnings which were not
caught because this file had not been added to Makefile.rtl.

Tested on x86_64-pc-linux-gnu, committed on trunk

gcc/ada/

	* Makefile.rtl (GNATRTL_NONTASKING_OBJS): Add g-spogwa object.
	* libgnat/g-spogwa.adb: Fix style errors.
diff mbox series

Patch

diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
--- a/gcc/ada/Makefile.rtl
+++ b/gcc/ada/Makefile.rtl
@@ -483,6 +483,7 @@  GNATRTL_NONTASKING_OBJS= \
   g-speche$(objext) \
   g-spipat$(objext) \
   g-spitbo$(objext) \
+  g-spogwa$(objext) \
   g-sptabo$(objext) \
   g-sptain$(objext) \
   g-sptavs$(objext) \


diff --git a/gcc/ada/libgnat/g-spogwa.adb b/gcc/ada/libgnat/g-spogwa.adb
--- a/gcc/ada/libgnat/g-spogwa.adb
+++ b/gcc/ada/libgnat/g-spogwa.adb
@@ -36,8 +36,6 @@  procedure GNAT.Sockets.Poll.G_Wait
 is
    use Interfaces;
 
-   use type C.int;
-
    function C_Select
      (Nfds      : C.int;
       readfds   : access FD_Set_Type;
@@ -65,8 +63,8 @@  begin
 
    if Timeout >= 0 then
       Timeout_A := Timeout_V'Access;
-      Timeout_V.tv_sec  := Thin_Common.time_t  (Timeout / 1000);
-      Timeout_V.tv_usec := Thin_Common.suseconds_t (Timeout rem 1000 * 1000);
+      Timeout_V.Tv_Sec  := Thin_Common.time_t  (Timeout / 1000);
+      Timeout_V.Tv_Usec := Thin_Common.suseconds_t (Timeout rem 1000 * 1000);
    end if;
 
    Reset_Socket_Set (Rfds);