adasockets icon indicating copy to clipboard operation
adasockets copied to clipboard

gcc-12 false positive warning

Open asarhaddon opened this issue 1 year ago • 0 comments

Hello. This trivial patch silents a new GCC warning, which does not apply here because of the following Elaborate_All pragma.

--- a/src/sockets-multicast.adb                                                
+++ b/src/sockets-multicast.adb                                                
@@ -38,7 +38,9 @@                                                              
                                                                               
 with Ada.Exceptions;    use Ada.Exceptions;                                   
 with Interfaces.C;      use Interfaces.C;                                     
+pragma Warnings (Off, "unnecessary with of ancestor");                        
 with Sockets;                                                                 
+pragma Warnings (On, "unnecessary with of ancestor");                         
 pragma Elaborate_All (Sockets);                                               
 with Sockets.Constants; use Sockets.Constants;                                
 with Sockets.Naming;    use Sockets.Naming;                                   

asarhaddon avatar Aug 30 '22 06:08 asarhaddon