Natools

Check-in [b8364499b7]
Login
Overview
Comment:Adjustments to pass GNAT 4.9 compilatiion without warning
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: b8364499b789abc848708638f1e1c51fc9bc0601
User & Date: nat on 2014-04-03 20:21:44
Other Links: manifest | tags
Context
2014-04-04
21:18
hmac: new package providing a generic HMAC implementation using a formal hash function check-in: 0f22d2b71f user: nat tags: trunk
2014-04-03
20:21
Adjustments to pass GNAT 4.9 compilatiion without warning check-in: b8364499b7 user: nat tags: trunk
2014-04-02
20:33
s_expressions-atom_buffers: use Natools.Storage_Pools instead of local dummy access type check-in: f3bcd34a8a user: nat tags: trunk
Changes

Modified src/natools-chunked_strings.adb from [ba9d2b7b2a] to [96ce81a254].

253
254
255
256
257
258
259

260
261
262
263
264
265
266
267
         return;
      end if;
      pragma Assert (Chunk_Nb > 0);

      if Data = null or else Data'Length < Chunk_Nb then
         declare
            First_New : Positive := 1;

            New_Data : Chunk_Array_Access := new Chunk_Array (1 .. Chunk_Nb);
         begin
            if Data /= null then
               Resize_Chunk (Data (Data'Last), Chunk_Size);
               New_Data (1 .. Data'Last) := Data.all;
               First_New := Data'Last + 1;
               Deallocate (Data);
            end if;







>
|







253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
         return;
      end if;
      pragma Assert (Chunk_Nb > 0);

      if Data = null or else Data'Length < Chunk_Nb then
         declare
            First_New : Positive := 1;
            New_Data : constant Chunk_Array_Access
              := new Chunk_Array (1 .. Chunk_Nb);
         begin
            if Data /= null then
               Resize_Chunk (Data (Data'Last), Chunk_Size);
               New_Data (1 .. Data'Last) := Data.all;
               First_New := Data'Last + 1;
               Deallocate (Data);
            end if;

Modified tests/natools-chunked_strings-tests-cxa4011.adb from [0be53a49b6] to [9afd0eec82].

84
85
86
87
88
89
90
91

92
93
94
95
96
97
98
      declare
         Name : constant String := "Operator ""&""";
         Tests : array (1 .. 3) of Boolean;
      begin
         Incomplete_String := 'I' & Incomplete_String;
         Incomplete_String := Incomplete_String & A_Small_G;
         if not Is_Valid (Incomplete_String)
           or not Is_Valid (Complete_String) then

            NT.Item (Report, Name, NT.Error);
            if not Is_Valid (Incomplete_String) then
               NT.Info (Report, "Incomplete_String is invalid");
            end if;
            if not Is_Valid (Complete_String) then
               NT.Info (Report, "Complete_String is invalid");
            end if;







|
>







84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
      declare
         Name : constant String := "Operator ""&""";
         Tests : array (1 .. 3) of Boolean;
      begin
         Incomplete_String := 'I' & Incomplete_String;
         Incomplete_String := Incomplete_String & A_Small_G;
         if not Is_Valid (Incomplete_String)
           or not Is_Valid (Complete_String)
         then
            NT.Item (Report, Name, NT.Error);
            if not Is_Valid (Incomplete_String) then
               NT.Info (Report, "Incomplete_String is invalid");
            end if;
            if not Is_Valid (Complete_String) then
               NT.Info (Report, "Complete_String is invalid");
            end if;