From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-0.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM,WEIRD_PORT autolearn=no autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: =?UTF-8?B?QmrDtnJuIEx1bmRpbg==?= Newsgroups: comp.lang.ada Subject: Re: Ada.Containers warnings with gnat Date: Sun, 16 Nov 2014 12:37:54 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Injection-Date: Sun, 16 Nov 2014 11:36:28 +0000 (UTC) Injection-Info: mx02.eternal-september.org; posting-host="b769336d2d75b70563e15ed95a5ef354"; logging-data="8417"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+8ngASPToUDyy8gOmPQmrC" User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.1.2 In-Reply-To: Cancel-Lock: sha1:PObPm3wcIltJyZOvu6HpIsrCYpg= Xref: news.eternal-september.org comp.lang.ada:23416 Date: 2014-11-16T12:37:54+01:00 List-Id: On 2014-11-16 11:05, Björn Lundin wrote: It seems to be ok until I - in the body - do with Ada.Streams; with Ada.Streams.Stream_IO; With no code actually using stream_io I get 21. package Sample_Map_Pack is new Ada.Containers.Ordered_Maps | >>> warning: in instantiation at a-coorma.ads:266 >>> warning: no entities of package "Ada.Streams" are referenced 27. package Marketid_Map_Pack is new Ada.Containers.Hashed_Maps | >>> warning: in instantiation at a-cohama.ads:342 >>> warning: no entities of package "Ada.Streams" are referenced >>> warning: in instantiation at a-chtgop.ads:154 >>> warning: in instantiation at a-cohama.adb:85 >>> warning: no entities of package "Ada.Streams" are referenced >>> warning: in instantiation at a-chtgop.ads:165 >>> warning: in instantiation at a-cohama.adb:85 >>> warning: no entities of package "Ada.Streams" are referenced >>> warning: in instantiation at a-chtgop.ads:165 >>> warning: in instantiation at a-cohama.adb:103 >>> warning: no entities of package "Ada.Streams" are referenced >>> warning: in instantiation at a-chtgop.ads:154 >>> warning: in instantiation at a-cohama.adb:104 >>> warning: no entities of package "Ada.Streams" are referenced 34. package Winner_Map_Pack is new Ada.Containers.Hashed_Maps | >>> warning: in instantiation at a-cohama.ads:342 >>> warning: no entities of package "Ada.Streams" are referenced >>> warning: in instantiation at a-chtgop.ads:154 >>> warning: in instantiation at a-cohama.adb:85 >>> warning: no entities of package "Ada.Streams" are referenced >>> warning: in instantiation at a-chtgop.ads:165 >>> warning: in instantiation at a-cohama.adb:85 >>> warning: no entities of package "Ada.Streams" are referenced >>> warning: in instantiation at a-chtgop.ads:165 >>> warning: in instantiation at a-cohama.adb:103 >>> warning: no entities of package "Ada.Streams" are referenced >>> warning: in instantiation at a-chtgop.ads:154 >>> warning: in instantiation at a-cohama.adb:104 >>> warning: no entities of package "Ada.Streams" are referenced 41. package Win_Place_Map_Pack is new Ada.Containers.Hashed_Maps | >>> warning: in instantiation at a-cohama.ads:342 >>> warning: no entities of package "Ada.Streams" are referenced >>> warning: in instantiation at a-chtgop.ads:154 >>> warning: in instantiation at a-cohama.adb:85 >>> warning: no entities of package "Ada.Streams" are referenced >>> warning: in instantiation at a-chtgop.ads:165 >>> warning: in instantiation at a-cohama.adb:85 >>> warning: no entities of package "Ada.Streams" are referenced >>> warning: in instantiation at a-chtgop.ads:165 >>> warning: in instantiation at a-cohama.adb:103 >>> warning: no entities of package "Ada.Streams" are referenced >>> warning: in instantiation at a-chtgop.ads:154 >>> warning: in instantiation at a-cohama.adb:104 >>> warning: no entities of package "Ada.Streams" are referenced 763 lines: No errors, 50 warnings If I then move on to actually use Streams_io, the warnings are reduced to ==============Error messages for source file: /home/bnl/bnlbot/botstart/bot-1-0/source/ada/local/utils/simulation_storage.ads 21. package Sample_Map_Pack is new Ada.Containers.Ordered_Maps | >>> warning: in instantiation at a-coorma.ads:266 >>> warning: no entities of package "Ada.Streams" are referenced 27. package Marketid_Map_Pack is new Ada.Containers.Hashed_Maps | >>> warning: in instantiation at a-cohama.ads:342 >>> warning: no entities of package "Ada.Streams" are referenced 34. package Winner_Map_Pack is new Ada.Containers.Hashed_Maps | >>> warning: in instantiation at a-cohama.ads:342 >>> warning: no entities of package "Ada.Streams" are referenced 41. package Win_Place_Map_Pack is new Ada.Containers.Hashed_Maps | >>> warning: in instantiation at a-cohama.ads:342 >>> warning: no entities of package "Ada.Streams" are referenced 763 lines: No errors, 8 warnings the actual usage is just declare File : Ada.Streams.Stream_IO.File_Type; Stream : Ada.Streams.Stream_IO.Stream_Access; Filename : String := Global_Map_Files(Marketid).Filename.Fix_String; begin Ada.Streams.Stream_IO.Open (File => File, Name => Filename, Mode => Ada.Streams.Stream_IO.In_File); Stream := Ada.Streams.Stream_IO.Stream (File); Marketid_Map_Pack.Map'Read(Stream, Marketid_Map); Ada.Streams.Stream_IO.Close(File); Log(Object & Service, "Marketid_Map read from file " & Filename); end; for 3 different maps, and 3 corresponding Write sections however I have put the generic instansiation between pragma Warnings(Off) pragma Warnings(On) but it is still somewhat strange I think -- Björn