From: "Björn Lundin" <b.f.lundin@gmail.com>
Subject: Re: Ada.Containers warnings with gnat
Date: Sun, 16 Nov 2014 12:37:54 +0100
Date: 2014-11-16T12:37:54+01:00 [thread overview]
Message-ID: <m4a27r$871$1@dont-email.me> (raw)
In-Reply-To: <m49spm$n8t$1@dont-email.me>
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
next prev parent reply other threads:[~2014-11-16 11:37 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-11-15 14:35 Ada.Containers warnings with gnat Björn Lundin
2014-11-15 15:15 ` Björn Lundin
2014-11-15 18:01 ` Jeffrey Carter
2014-11-16 10:05 ` Björn Lundin
2014-11-16 11:37 ` Björn Lundin [this message]
2014-11-16 17:32 ` Jeffrey Carter
2014-11-17 8:13 ` Björn Lundin
2014-11-17 16:39 ` Anh Vo
2014-11-17 17:27 ` Jeffrey Carter
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox