[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#393072: Removing extra blank lines does not seem enough for that bug



I imagined that the attached patch would be enough to solve this
bug....

However, it seems that another bug is lying around:

.../...
gcc-4.1 -c -gnatfno -O3 -gnatg -g -I- -gnatA -gnatpg /home/bubulle/tmp/tmp/libadabindx-0.7.2/build/i-csstli.adb
i-csstli.adb:51:04: warning: "Elmt_Size" is not modified, could be declared constant
gnatmake: "/home/bubulle/tmp/tmp/libadabindx-0.7.2/build/i-csstli.adb" compilation error
make: *** [build/libadabindx.a] Erreur 4



-- 


diff -Nru libadabindx-0.7.2.ori/debian/changelog libadabindx-0.7.2/debian/changelog
--- libadabindx-0.7.2.ori/debian/changelog	2006-12-07 11:19:11.365524352 +0100
+++ libadabindx-0.7.2/debian/changelog	2006-12-07 19:14:48.100689878 +0100
@@ -1,3 +1,10 @@
+libadabindx (0.7.2-7) unstable; urgency=high
+
+  * Remove extra blank lines in i-csstli.adb and i-csstli.ads
+    Closes: #393072
+
+ -- Christian Perrier <bubulle@debian.org>  Thu,  7 Dec 2006 19:13:41 +0100
+
 libadabindx (0.7.2-6) unstable; urgency=low
   
   * debian/rules: accept any character in the Debian upload number.
diff -Nru libadabindx-0.7.2.ori/examples/image/image_global.adb.orig libadabindx-0.7.2/examples/image/image_global.adb.orig
--- libadabindx-0.7.2.ori/examples/image/image_global.adb.orig	2006-12-07 11:19:11.269523689 +0100
+++ libadabindx-0.7.2/examples/image/image_global.adb.orig	1970-01-01 01:00:00.000000000 +0100
@@ -1,118 +0,0 @@
-with Ada.Calendar,
-     Ada.Text_Io,
-     System.Unsigned_Types;
-with Ada.Numerics.Generic_Elementary_Functions;
-with Motif_Graphics;
-with Common;
-
-use  Ada.Text_Io,
-     System.Unsigned_Types;
-
-package body Image_Global is
-
-   type Real is digits 6;
-
-   package Real_Functions is
-      new Ada.Numerics.Generic_Elementary_Functions (Real);
-   use Real_Functions;
-
-   Last_X: constant Integer := Integer (Motif_Graphics.A_X_Point'Last);
-   Last_Y: constant Integer := Integer (Motif_Graphics.A_Y_Point'Last);
-
-   T     : Integer := 1;
-
-   Argl  : X_Toolkit.Arg_List := X_Toolkit.Null_Arg_List;
-
-   procedure Redraw_Image (W: in X_Toolkit.Widget) is
-      X: Motif_Graphics.A_X_Point;
-      Y: Motif_Graphics.A_Y_Point;
-      J: Integer;
-   begin
-      Common.Window := X_Toolkit.Xt_Window (W);
-      X_Lib.X_Clear_Window (Common.Display, Common.Window);
-
-      for I in 1 .. Motif_Graphics.Wide-2 loop
-         J := Integer (
-                 abs (Sin ((Real (I + T) / 100.0) * Ada.Numerics.PI)) * 199.0);
-         X := Motif_Graphics.A_X_Point (I);
-         Y := Motif_Graphics.A_Y_Point (J);
-
-         -- Draw the line.
-         Motif_Graphics.Draw_Line ((X, 0), (X, Y), Common.Blue);
-
-         -- Blank out the rest.
-         if    J = Last_Y - 1 then
-            Motif_Graphics.Put_Pixel (I, Last_X, Common.White);
-         elsif J < Last_Y - 1 then
-            Motif_Graphics.Draw_Line ((X, Motif_Graphics.A_Y_Point (J + 1)),
-                                      (X, Motif_Graphics.A_Y_Point'Last),
-                                       Common.White);
-        end if;
-      end loop;
-
-      -- draw box
-      Motif_Graphics.Draw_Box;
-
-      Motif_Graphics.Show_CRT;
-
-      T := T + 1;
-
-   end Redraw_Image;
-
-
-   procedure Resize_Image (W: in X_Toolkit.Widget) is
-      Width, Height: X_Lib.Dimension;
-   use XM_Widgets;
-   begin
-      Argl := X_Toolkit.Null_Arg_List;
-      X_Toolkit.Append_Get (Argl, Xm_N_Width, Width);
-      X_Toolkit.Append_Get (Argl, Xm_N_Height, Height);
-      X_Toolkit.Xt_Get_Values (W, Argl);
-
-      Put_Line ("new size: " & X_Lib.Dimension'Image (Width) & " x" &
-                               X_Lib.Dimension'Image (Height));
-
-      if Integer (Width) > Last_X then
-           Common.Origin_X := Short_Integer (Width  - Motif_Graphics.Wide) / 2;
-      else Common.Origin_X := 0; end if;
-      if Integer (Height) > Last_Y then
-           Common.Origin_Y := Short_Integer (Height - Motif_Graphics.High) / 2;
-      else Common.Origin_Y := 0; end if;
-      
-   end Resize_Image;
-
-
-   procedure Expose_Image_CB (W         : in X_Toolkit.Widget;
-                              Closure   : in X_Toolkit.Xt_Pointer;
-                              Call_Data : in X_Toolkit.Xt_Pointer) is
-   begin
-      Put_Line ("Expose_Image_CB called");
-      Redraw_Image (W);
-   end Expose_Image_CB;
-
-
-   procedure Resize_Image_CB (W         : in X_Toolkit.Widget;
-                              Closure   : in X_Toolkit.Xt_Pointer;
-                              Call_Data : in X_Toolkit.Xt_Pointer) is
-   begin
-      Put_Line ("Resize_Image_CB called");
-      Resize_Image (W);
-   end Resize_Image_CB;
-
-
-   procedure Timeout_CB (Client_Data : in     X_Toolkit.Xt_Pointer;
-                         ID          : in out X_Toolkit.Interval_ID) is
-      use Ada.Calendar;
-   begin
-   
-      Common.Timer_ID := X_Toolkit.Xt_App_Add_Time_Out
-            (Common.App_Con, 1000, Timeout_CB'Access, Client_Data);
-
-      Redraw_Image (Common.The_Draw);
-
-      ID := Common.Timer_ID;
-
-   end Timeout_CB;
-
-
-end Image_Global;
diff -Nru libadabindx-0.7.2.ori/examples/image/motif_graphics.adb.orig libadabindx-0.7.2/examples/image/motif_graphics.adb.orig
--- libadabindx-0.7.2.ori/examples/image/motif_graphics.adb.orig	2006-12-07 11:19:11.273523716 +0100
+++ libadabindx-0.7.2/examples/image/motif_graphics.adb.orig	1970-01-01 01:00:00.000000000 +0100
@@ -1,142 +0,0 @@
--- File Name: motif_graphics.adb    Unit Type:  Package body
-
--- Unit Name: Motif_Graphics
-
--- By  Jim Bean;  Original version 24-Oct-96
-
--- Abstract: Low Level Display CRT data for HUD project
-
--- Environment:  Embedded Intel using Linux kernel.
---               GNU Linux Ada
-
-with X_Lib;
-with X_toolkit;
-
-with System.Unsigned_Types;
-with Text_IO;
-with Common;
-
-package body Motif_Graphics is
-
-   HPix: constant System.Unsigned_Types.Short_Unsigned := High;
-   WPix: constant System.Unsigned_Types.Short_Unsigned := Wide;
-   H_Pix: constant Integer := High;
-   W_Pix: constant Integer := Wide;
-
-   type COLOR_TABLES is array (Common.Color_Indices) of X_Lib.Pixel;
-
-   CRT             : X_Lib.X_Image_Pointer;
-
-   Color_Table     : Color_Tables;
-
-----------------------------------------------------------
-
-   procedure Make_Colors is
-      type A_COLOR is record
-         R: System.Unsigned_Types.Short_Unsigned;
-         G: System.Unsigned_Types.Short_Unsigned;
-         B: System.Unsigned_Types.Short_Unsigned;
-      end record;
-
-      type COLOR_VALS is array (Common.COLOR_INDICES) of A_COLOR;
-      Color_Val: constant COLOR_VALS :=
-         (Common.Red   => (R => 16#FFFF#, G => 0,        B => 0),
-          Common.Blue  => (R => 0,        G => 0,        B => 16#FFFF#),
-          Common.Black => (R => 0,        G => 0,        B => 0),
-          Common.White => (R => 16#FFFF#, G => 16#FFFF#, B => 16#FFFF#));
-
-      ColorCell: X_Lib.X_Color;
-   begin
-      for I in Common.Red..Common.White loop
-         ColorCell.red   := Color_Val (I).R;
-         ColorCell.green := Color_Val (I).G;
-         ColorCell.blue  := Color_Val (I).B;
-
-         X_Lib.X_Alloc_Color (Common.Display, Common.Color_Map, ColorCell);
-
-         Color_Table (I) := ColorCell.Pix;
-
-      end loop;
-   end Make_Colors;
-
-----------------------------------------------------------
-
-   procedure Make_CRT is
-      PixMap    : X_Lib.Pixmap_Id;
-   use X_Lib;
-   begin
-
-      Make_Colors;
-
-      -- Make an empty 320x200 PixMap.
-      Pixmap := X_Lib.X_Create_Pixmap
-               (Common.Display, Common.Window, WPix, HPix, 8);
-
-      -- Convert that to an empty Image.
-      CRT    := X_Lib.X_Get_Image
-               (Common.Display, Pixmap, 0, 0, W_Pix, H_Pix,
-                    X_Lib.X_All_Planes, X_Lib.Z_Pixmap);
-
-      -- Fill the Image (CRT) with white pixels.
-      for I in 0..H_Pix-1 loop
-         for J in 0..W_Pix-1 loop
-            X_Lib.X_Put_Pixel (CRT, J, I, Color_Table (Common.White));
-         end loop;
-      end loop;
-
-   exception
-      when others => Text_IO.Put_Line ("Other error in Make_CRT");
-   end Make_CRT;
-
-----------------------------------------------------------
-
-   procedure Show_CRT is
-   begin
-      X_Lib.X_Put_Image (Common.Display, Common.Window, Common.GC, CRT,
-                   0, 0, Integer (Common.Origin_X),
-                         Integer (Common.Origin_Y), W_Pix, H_Pix);
-   exception
-      when others => Text_IO.Put_Line ("Error in Show_CRT");
-   end Show_CRT;
-
------------------------------------------------------------------------
-
-   procedure Put_Pixel (X_Pos: in Integer;
-                        Y_Pos: in Integer;
-                        Color: in Common.Color_Indices) is
-   begin
-      X_Lib.X_Put_Pixel (CRT, Integer (X_Pos),
-                              Integer (Y_Pos), Color_Table (Color));
-   end;
-
-----------------------------------------------------------
-
-   procedure Draw_Line (A: in A_Point;
-                        B: in A_Point;
-                        C: in Common.Color_Indices) is
-   begin
-      if    A.Y = B.Y then  -- Horizontal line.
-         for X in A.X .. B.X loop
-            Put_Pixel (Integer (X), Integer (A.Y), C);
-         end loop;
-
-      elsif A.X = B.X then  -- Vertical line.
-         for Y in A.Y .. B.Y loop
-            Put_Pixel (Integer (A.X), Integer (Y), C);
-         end loop;
-      end if;
-   exception
-      when others => Text_IO.Put_Line ("Exception in Draw_Line");
-   end Draw_Line;
-
-----------------------------------------------------------
-
-   procedure Draw_Box is
-   begin
-      Draw_Line ((0,0),      (Wide-1,0),      Common.Red);
-      Draw_Line ((Wide-1,0), (Wide-1,High-1), Common.Red);
-      Draw_Line ((0,High-1), (Wide-1,High-1), Common.Red);
-      Draw_Line ((0,0),      (0,High-1),      Common.Red);
-   end Draw_Box;
-
-end Motif_Graphics;
diff -Nru libadabindx-0.7.2.ori/lib/i-csstli.adb libadabindx-0.7.2/lib/i-csstli.adb
--- libadabindx-0.7.2.ori/lib/i-csstli.adb	2006-12-07 11:19:11.205523247 +0100
+++ libadabindx-0.7.2/lib/i-csstli.adb	2006-12-07 11:38:11.077478118 +0100
@@ -48,12 +48,10 @@
 
    package String_List_Access is
       new System.Address_To_Access_Conversions (chars_ptr);
-
    Elmt_Size : size_t :=
                  (chars_ptr'Size
                    + System.Storage_Unit - 1) / System.Storage_Unit;
 
-
    -----------------------
    -- Local Subprograms --
    -----------------------
@@ -92,7 +90,6 @@
       Left := Left + chars_ptr_array_ptr (Elmt_Size);
    end Increment;
 
-
    ----------
    -- Free --
    ----------
@@ -119,7 +116,6 @@
       Item := Null_Array_Ptr;
    end Free;
 
-
    procedure Free
      (Item   : in out chars_ptr_array_ptr;
       Length : in     size_t) is
@@ -140,7 +136,6 @@
       Item := Null_Array_Ptr;
    end Free;
 
-
    function New_Chars_Ptr_Array
      (Ary         : in chars_ptr_array;
       Append_Null : in Boolean := True)
@@ -171,7 +166,6 @@
       return Pointer;
    end New_Chars_Ptr_Array;
 
-
    function Value
      (Item   : in chars_ptr_array_ptr;
       Offset : in size_t)
@@ -180,7 +174,6 @@
       return String_List_Access.To_Pointer (To_Address (Item + Offset)).all;
    end Value;
 
-
    procedure Update
      (Item      : in out chars_ptr_array_ptr;
       Offset    : in     size_t;
@@ -196,7 +189,6 @@
       Ptr.all := New_Value;
    end Update;
 
-
    function Length (Item : in chars_ptr_array_ptr) return size_t is
       Item_Index : size_t := 0;
    begin
@@ -215,14 +207,11 @@
       end loop;
    end Length;
 
-
    function Value (Item : in chars_ptr_array_ptr) return chars_ptr_array is
    begin
       return Value (Item, Length (Item));
    end Value;
 
-
-
    function Value
      (Item   : in chars_ptr_array_ptr;
       Length : in     size_t)
@@ -238,7 +227,6 @@
       return Ary;
    end Value;
 
-
    function Duplicate
      (Item     : in chars_ptr_array_ptr)
       return chars_ptr_array_ptr is
@@ -250,7 +238,6 @@
       end if;
    end Duplicate;
 
-
    function Duplicate
      (Item     : in chars_ptr_array_ptr;
       Length   : in size_t)
@@ -275,5 +262,4 @@
       return Pointer;
    end Duplicate;
 
-
 end Interfaces.C.Strings.String_Lists;
diff -Nru libadabindx-0.7.2.ori/lib/i-csstli.ads libadabindx-0.7.2/lib/i-csstli.ads
--- libadabindx-0.7.2.ori/lib/i-csstli.ads	2006-12-07 11:19:11.205523247 +0100
+++ libadabindx-0.7.2/lib/i-csstli.ads	2006-12-07 11:38:02.769420403 +0100
@@ -74,8 +74,6 @@
       Offset    : in     size_t;
       New_Value : in     chars_ptr);
 
-
-
    --  handle null-terminated arrays (i.e. with a trailing Null_Ptr)
    --
    procedure Free (Item : in out chars_ptr_array_ptr);
@@ -90,8 +88,6 @@
      (Item     : in chars_ptr_array_ptr)
       return chars_ptr_array_ptr;
 
-
-
    --  handle unterminated arrays (i.e. without a trailing Null_Ptr)
    --
    procedure Free
@@ -110,7 +106,6 @@
       Length   : in size_t)
       return chars_ptr_array_ptr;
 
-
 private
 
    type chars_ptr_array_ptr is new System.Storage_Elements.Integer_Address;

Attachment: signature.asc
Description: Digital signature


Reply to: