Removed most warnings in new 2018 gnat gpl

This commit is contained in:
Alejandro R Mosteo
2018-06-10 22:16:59 +02:00
parent 83c0a851ae
commit e417a2ef34
7 changed files with 46 additions and 46 deletions
+1 -1
View File
@@ -16,6 +16,6 @@ package Alire.Index.Hungarian is
package V_1_0_0 is new Project_Release
(Base
.Replacing (Git (Repo, "c784e09b8f9bd02c76d89b458ad6a32f65cfd146")));
.Replacing (Git (Repo, "2494b4501837979a92a1de90e05c95ed7b23ce93")));
end Alire.Index.Hungarian;
-4
View File
@@ -84,7 +84,6 @@ package body Alire.Boolean_Trees is
-----------
function "not" (T : Tree) return Tree is
use Trees;
begin
return Merge_Under (Node'(Kind => Not_Node), T);
end "not";
@@ -148,7 +147,6 @@ package body Alire.Boolean_Trees is
-----------
function Image (T : Tree) return String is
use Trees;
begin
if T.Is_Empty then
return "(empty tree)";
@@ -171,8 +169,6 @@ package body Alire.Boolean_Trees is
--------------------
function Image_Skeleton (T : Tree) return String is
use Trees;
begin
if T.Is_Empty then
return "(empty tree)";
-4
View File
@@ -24,8 +24,6 @@ package Alire.Dependencies with Preelaborate is
private
use all type Semantic_Versioning.Version;
type Dependency (Name_Len : Natural) is tagged record
Project : Alire.Project (1 .. Name_Len);
Versions : Semantic_Versioning.Version_Set;
@@ -40,8 +38,6 @@ private
function Versions (Dep : Dependency) return Semantic_Versioning.Version_Set is
(Dep.Versions);
use all type Alire.Project;
function Image (Dep : Dependency) return String is -- Exceptional case: alire=0.0.0 means Unavailable
(if Dep = Unavailable
then "Unavailable"
+40 -34
View File
@@ -166,16 +166,12 @@ package Alire.Index is
------------------------
-- INDEXING SUPPORT --
------------------------
use all type Alire.Project;
-- Shortcuts for origins:
function Git (URL : Alire.URL; Commit : Origins.Git_Commit) return Origins.Origin renames Origins.New_Git;
function Hg (URL : Alire.URL; Commit : Origins.Hg_Commit) return Origins.Origin renames Origins.New_Hg;
use all type Platforms.Distributions;
function Packaged_As (S : String) return Origins.Package_Names renames Origins.Packaged_As;
function Unavailable return Origins.Package_Names renames Origins.Unavailable;
@@ -190,9 +186,6 @@ package Alire.Index is
function V (Semantic_Version : String) return Semver.Version
renames Semver.Relaxed;
use Versions.Expressions;
use Versions.Expressions_With_Versioned;
function Unavailable return Release_Dependencies;
-- A never available release
@@ -236,21 +229,6 @@ package Alire.Index is
------------------
-- Properties --
------------------
use all type Actions.Moments;
-- use all type Alire.Dependencies.Vectors.Vector;
use all type GPR.Value;
use all type GPR.Value_Vector;
use all type Licensing.Licenses;
use all type Platforms.Compilers;
use all type Platforms.Operating_Systems;
use all type Platforms.Targets;
use all type Platforms.Versions;
use all type Platforms.Word_Sizes;
use all type Properties.Property'Class;
use all type Release_Dependencies;
use all type Release_Properties;
use all type Requisites.Tree;
function On_Condition (Condition : Requisites.Tree;
When_True : Release_Properties;
@@ -319,26 +297,20 @@ package Alire.Index is
-- REQUISITES --
------------------
package Plat_Reqs renames Requisites.Platform;
-- package Plat_Reqs renames Requisites.Platform;
function Compiler is new Requisites.Platform.Compilers.Factory;
function Compiler is new Requisites.Platform.Compilers.Factory;
-- function Compiler_Is_Native return Release_Requisites renames Plat_Reqs.Compiler_Is_Native;
use all type Requisites.Platform.Compilers.Comparable;
function Distribution is new Requisites.Platform.Distributions.Factory;
use all type Requisites.Platform.Distributions.Comparable;
function Distribution is new Requisites.Platform.Distributions.Factory;
function Operating_System is new Requisites.Platform.Op_Systems.Factory;
use all type Requisites.Platform.Op_Systems.Comparable;
function Distro_Release is new Requisites.Platform.Versions.Factory;
use all type Requisites.Platform.Versions.Comparable;
function Distro_Release is new Requisites.Platform.Versions.Factory;
function Target is new Requisites.Platform.Targets.Factory;
use all type Requisites.Platform.Targets.Comparable;
function Target is new Requisites.Platform.Targets.Factory;
function Word_Size is new Requisites.Platform.Word_Sizes.Factory;
use all type Requisites.Platform.Word_Sizes.Comparable;
function Word_Size is new Requisites.Platform.Word_Sizes.Factory;
------------
-- ROOT --
@@ -362,6 +334,40 @@ package Alire.Index is
function Set_Root (R : Release) return Roots.Root renames Alire.Root.Set;
-- An unindexed working copy (See New_Working_Release)
------------
-- USES --
------------
-- For the benefit of child index files
pragma Warnings (Off);
use all type Actions.Moments;
use all type Alire.Project;
use all type GPR.Value;
use all type GPR.Value_Vector;
use all type Licensing.Licenses;
use all type Platforms.Compilers;
use all type Platforms.Distributions;
use all type Platforms.Operating_Systems;
use all type Platforms.Targets;
use all type Platforms.Versions;
use all type Platforms.Word_Sizes;
use all type Properties.Property'Class;
use all type Release_Dependencies;
use all type Release_Properties;
use all type Requisites.Platform.Compilers.Comparable;
use all type Requisites.Platform.Distributions.Comparable;
use all type Requisites.Platform.Op_Systems.Comparable;
use all type Requisites.Platform.Targets.Comparable;
use all type Requisites.Platform.Versions.Comparable;
use all type Requisites.Platform.Word_Sizes.Comparable;
use all type Requisites.Tree;
use Versions.Expressions;
use Versions.Expressions_With_Versioned;
pragma Warnings (On);
private
type Catalog_Entry (Name_Len, Descr_Len, Pack_Len, Self_Len : Natural) is new
-2
View File
@@ -17,8 +17,6 @@ package Alire.Milestones with Preelaborate is
private
use all type Alire.Project;
type Milestone (Name_Len : Natural) is tagged record
Name : Alire.Project (1 .. Name_Len);
Version : Semantic_Versioning.Version;
+4
View File
@@ -4,11 +4,15 @@ package Alire.Requisites.Booleans with Preelaborate is
type Requisite_False is new Requisite with null record;
pragma Warnings (Off); -- For the unused parameters
function Is_Applicable (R : Requisite_True; P : Property'Class) return Boolean is (True);
function Satisfies (R : Requisite_True; P : Property'Class) return Boolean is (True);
function Image (R : Requisite_True) return String is ("True");
function Is_Applicable (R : Requisite_False; P : Property'Class) return Boolean is (True);
function Satisfies (R : Requisite_False; P : Property'Class) return Boolean is (False);
function Image (R : Requisite_False) return String is ("False");
pragma Warnings (On);
function Always_True return Tree is (Trees.Leaf (Requisite_True'(null record)));
function Always_False return Tree is (Trees.Leaf (Requisite_False'(null record)));
+1 -1
View File
@@ -10,7 +10,7 @@ package Alire.Requisites with Preelaborate is
-- Here we provide the basic storage of values but the actual checking function must be overridden
-- for particular checks.
function Is_Applicable (R : Requisite; P : Property'Class) return Boolean is (False);
function Is_Applicable (R : Requisite; P : Property'Class) return Boolean is abstract;
-- Initially there is no compatibility. See helper package below
-- The following package is the building block to be used to define new compatibility checks.