The unified diff between revisions [b89440b3..] and [121647f0..] is displayed below. It can also be downloaded as a raw diff.

This diff has been restricted to the following files: 'debian/patches/demo_warnings.patch'

#
#
# patch "debian/patches/demo_warnings.patch"
#  from [9c92587ba0b67a58dd199f7a5d6924135d4cdddc]
#    to [82d2a6ce9f315f45ac8da5d115c9eafcf00a12b5]
#
============================================================
--- debian/patches/demo_warnings.patch	9c92587ba0b67a58dd199f7a5d6924135d4cdddc
+++ debian/patches/demo_warnings.patch	82d2a6ce9f315f45ac8da5d115c9eafcf00a12b5
@@ -5,8 +5,8 @@ Index: gnade-1.6.2/samples/odbc/demo.gpb

 Index: gnade-1.6.2/samples/odbc/demo.gpb
 ===================================================================
---- gnade-1.6.2.orig/samples/odbc/demo.gpb	2009-10-04 09:30:28.000000000 -0400
-+++ gnade-1.6.2/samples/odbc/demo.gpb	2009-10-04 09:30:39.000000000 -0400
+--- gnade-1.6.2.orig/samples/odbc/demo.gpb	2009-10-05 02:20:57.000000000 -0400
++++ gnade-1.6.2/samples/odbc/demo.gpb	2009-10-05 02:21:00.000000000 -0400
 @@ -37,7 +37,6 @@
  with Ada.Command_Line;
  with Ada.Strings.Fixed;        use Ada.Strings.Fixed;
@@ -14,48 +14,48 @@ Index: gnade-1.6.2/samples/odbc/demo.gpb
 -with Ada.Exceptions;           use Ada.Exceptions;
  with GNU.DB.SQLCLI;            use GNU.DB.SQLCLI;
  with GNU.DB.SQLCLI.Bind;
-
+
 @@ -72,9 +71,9 @@
     EnvironmentHandle : SQLHENV;
     ConnectionHandle  : SQLHDBC;
-
+
 -   ServerName     : String := String'($DBSOURCE);
 -   UserName       : String := String'($DBUSER);
 -   Authentication : String := String'($DBPASSWD);
 +   ServerName     : constant String := String'($DBSOURCE);
 +   UserName       : constant String := String'($DBUSER);
 +   Authentication : constant String := String'($DBPASSWD);
-
+
     Quoting_Character : Character := Character'Val (34);
-
+
 @@ -178,7 +177,9 @@
     end if;
-
+
     if Do_All or else Do_Dump_Sources then
 +      Header ("ODBC Data Sources");
        Dump_Sources;
 +      Header;
     end if;
-
+
     SQLAllocHandle (SQL_HANDLE_DBC, EnvironmentHandle, ConnectionHandle);
 @@ -285,7 +286,7 @@
     SQLFreeHandle (SQL_HANDLE_ENV, EnvironmentHandle);
-
+
  #if addr2lines'Defined then
--
+-
 +
  exception
  when Event : others =>
     declare
 Index: gnade-1.6.2/samples/sample_db/gnade.mysql.sql
 ===================================================================
---- gnade-1.6.2.orig/samples/sample_db/gnade.mysql.sql	2009-10-04 09:30:28.000000000 -0400
-+++ gnade-1.6.2/samples/sample_db/gnade.mysql.sql	2009-10-04 09:30:39.000000000 -0400
+--- gnade-1.6.2.orig/samples/sample_db/gnade.mysql.sql	2009-10-05 02:20:57.000000000 -0400
++++ gnade-1.6.2/samples/sample_db/gnade.mysql.sql	2009-10-05 03:07:58.000000000 -0400
 @@ -4,7 +4,7 @@
  --                                                                           --
  --  Filename        : $Source: /cvsroot/gnade/gnade/samples/sample_db/gnade.mysql.sql,v $
  --  Description     : Makefile for the PostgreSQL sample database
----  Author          : Michael Erdmann <michael.erdmann@snafu.de>
+---  Author          : Michael Erdmann <michael.erdmann@snafu.de>
 +--  Author          : Michael Erdmann <michael.erdmann@snafu.de>
  --  Created On      : 02-April-2001
  --  Last Modified By: $Author: merdmann $
@@ -64,15 +64,15 @@ Index: gnade-1.6.2/samples/sample_db/gna
  --  GNADE is implemented to work with GNAT, the GNU Ada compiler.            --
  --                                                                           --
  -- ----------------------------------------------------------------------------
----  Functional Description
----  ======================
----  This SQL Script generates the test data base as it is used by
----  the code in the ./samples directory. The demo user has username="gnade"
----  and password="gnade".
----
----
----  Restrictions
----  ============
+---  Functional Description
+---  ======================
+---  This SQL Script generates the test data base as it is used by
+---  the code in the ./samples directory. The demo user has username="gnade"
+---  and password="gnade".
+---
+---
+---  Restrictions
+---  ============
 +--  Functional Description
 +--  ======================
 +--  This SQL Script generates the test data base as it is used by
@@ -83,126 +83,138 @@ Index: gnade-1.6.2/samples/sample_db/gna
 +--  Restrictions
 +--  ============
  --  This script is intended for use with MySQL.
----
----  References
----  ==========
----
+---
+---  References
+---  ==========
+---
 +--
 +--  References
 +--  ==========
 +--
-
---- build the test data base and store some tupples in it
+
+--- build the test data base and store some tupples in it
 +-- build the test data base and store some tupples in it
-
+
 +use gnade;
-
+
  CREATE TABLE EMPLOYEES (
          empno		 int4 NOT NULL,
 @@ -72,49 +73,49 @@
          deptno 		 int4 NOT NULL,
          name 		 character(20) NOT NULL,
          location 	 character(20)
--);
+-);
 +);
-
-
-----  Testdata
--insert into EMPLOYEES values
-+---  Testdata
+
+
+----  Testdata
+-insert into EMPLOYEES values
+-(  1, 'Erdmann',	'Michael',	1001,	'1999-12-31',	 2, 'Coding Monkey', 'T', 200.1234 );
+-insert into EMPLOYEES values
+-(  2, 'Massalski',	'Marina',	1000,	'2000-01-09', null, 'Supervisor',    'F', 200.00 );
+-insert into EMPLOYEES values
+-(  3, 'Tully',		'Noel',		1001,	'1959-01-23',	 2, 'Supervisor',    'T', 200.00 );
+-insert into EMPLOYEES values
+-(  4, 'Pfeifer',	'Jürgen',	1001,	'2001-01-01',	 2, 'Designer',	     'T', 200.00 );
+-insert into EMPLOYEES values
+-(  5, 'Smith',		'John',		1000,	'1980-06-11',	 3, 'Coding Monkey', 'T', 250.00 );
+-insert into EMPLOYEES values
+-(  6, 'Smith',		'John',		1001,	'1972-06-11',	 3, 'Designer',	     'T', 820.00 );
+-insert into EMPLOYEES values
+-( 50, 'Simpson',	'Bud',		1003,	'1980-06-11',	 3, 'Clerk',	     'F',  20.00 );
+-insert into EMPLOYEES values
+-( 51, 'Bundy',		'Al',		1003,	'1980-06-11',	 3, 'Clerk',	     'F',  10.00 );
+-insert into EMPLOYEES values
+-( 52, 'Bundy',		'Peggy',	1003,	'1988-06-15',	 3,  null,	     'F', -10.00 );
+-insert into EMPLOYEES values
+-( 53, 'Simpson',	'Kelly',	1003,	'1995-09-11',	 3, 'Secretary',     'F',  20.00 );
+-insert into EMPLOYEES values
+-(500, 'Rutherford',	'Ernest',	2000,	'1930-05-30',	 3, 'Genius',	     'T',1200.00 );
+-insert into EMPLOYEES values
+-(501, 'Fermi',		null,		2000,	'1940-07-29',	 3, 'Genius',	     'T',1200.00 );
+-insert into EMPLOYEES values
+-(502, 'Einstein',	'Albert',	2000,	'1941-04-30',	 2, 'Genius',	     'T',1200.00 );
+-insert into EMPLOYEES values
+-(503, 'Fermi',		null,		2000,	'1020-08-15',	 2, 'Genius',	     'T',1200.99 );
++--  Testdata
 +insert into EMPLOYEES values
- (  1, 'Erdmann',	'Michael',	1001,	'1999-12-31',	 2, 'Coding Monkey', 'T', 200.1234 );
--insert into EMPLOYEES values
++(  1, 'Erdmann',	'Michael',	1001,	'1999-12-31',	 2, 'Coding Monkey', 1, 200.1234 );
 +insert into EMPLOYEES values
- (  2, 'Massalski',	'Marina',	1000,	'2000-01-09', null, 'Supervisor',    'F', 200.00 );
--insert into EMPLOYEES values
++(  2, 'Massalski',	'Marina',	1000,	'2000-01-09', null, 'Supervisor',    0, 200.00 );
 +insert into EMPLOYEES values
- (  3, 'Tully',		'Noel',		1001,	'1959-01-23',	 2, 'Supervisor',    'T', 200.00 );
--insert into EMPLOYEES values
++(  3, 'Tully',		'Noel',		1001,	'1959-01-23',	 2, 'Supervisor',    1, 200.00 );
 +insert into EMPLOYEES values
- (  4, 'Pfeifer',	'Jürgen',	1001,	'2001-01-01',	 2, 'Designer',	     'T', 200.00 );
--insert into EMPLOYEES values
++(  4, 'Pfeifer',	'Jürgen',	1001,	'2001-01-01',	 2, 'Designer',	     1, 200.00 );
 +insert into EMPLOYEES values
- (  5, 'Smith',		'John',		1000,	'1980-06-11',	 3, 'Coding Monkey', 'T', 250.00 );
--insert into EMPLOYEES values
++(  5, 'Smith',		'John',		1000,	'1980-06-11',	 3, 'Coding Monkey', 1, 250.00 );
 +insert into EMPLOYEES values
- (  6, 'Smith',		'John',		1001,	'1972-06-11',	 3, 'Designer',	     'T', 820.00 );
--insert into EMPLOYEES values
++(  6, 'Smith',		'John',		1001,	'1972-06-11',	 3, 'Designer',	     1, 820.00 );
 +insert into EMPLOYEES values
- ( 50, 'Simpson',	'Bud',		1003,	'1980-06-11',	 3, 'Clerk',	     'F',  20.00 );
--insert into EMPLOYEES values
++( 50, 'Simpson',	'Bud',		1003,	'1980-06-11',	 3, 'Clerk',	     0,  20.00 );
 +insert into EMPLOYEES values
- ( 51, 'Bundy',		'Al',		1003,	'1980-06-11',	 3, 'Clerk',	     'F',  10.00 );
--insert into EMPLOYEES values
++( 51, 'Bundy',		'Al',		1003,	'1980-06-11',	 3, 'Clerk',	     0,  10.00 );
 +insert into EMPLOYEES values
- ( 52, 'Bundy',		'Peggy',	1003,	'1988-06-15',	 3,  null,	     'F', -10.00 );
--insert into EMPLOYEES values
++( 52, 'Bundy',		'Peggy',	1003,	'1988-06-15',	 3,  null,	     0, -10.00 );
 +insert into EMPLOYEES values
- ( 53, 'Simpson',	'Kelly',	1003,	'1995-09-11',	 3, 'Secretary',     'F',  20.00 );
--insert into EMPLOYEES values
++( 53, 'Simpson',	'Kelly',	1003,	'1995-09-11',	 3, 'Secretary',     0,  20.00 );
 +insert into EMPLOYEES values
- (500, 'Rutherford',	'Ernest',	2000,	'1930-05-30',	 3, 'Genius',	     'T',1200.00 );
--insert into EMPLOYEES values
++(500, 'Rutherford',	'Ernest',	2000,	'1930-05-30',	 3, 'Genius',	     1, 1200.00 );
 +insert into EMPLOYEES values
- (501, 'Fermi',		null,		2000,	'1940-07-29',	 3, 'Genius',	     'T',1200.00 );
--insert into EMPLOYEES values
++(501, 'Fermi',		null,		2000,	'1940-07-29',	 3, 'Genius',	     1, 1200.00 );
 +insert into EMPLOYEES values
- (502, 'Einstein',	'Albert',	2000,	'1941-04-30',	 2, 'Genius',	     'T',1200.00 );
--insert into EMPLOYEES values
--(503, 'Fermi',		null,		2000,	'1020-08-15',	 2, 'Genius',	     'T',1200.99 );
++(502, 'Einstein',	'Albert',	2000,	'1941-04-30',	 2, 'Genius',	     1, 1200.00 );
 +insert into EMPLOYEES values
-+(503, 'Fermi',		null,		2000,	'1020-08-15',	 2, 'Genius',	     'T',1200.99 );
-
--insert into DEPARTMENTS
++(503, 'Fermi',		null,		2000,	'1020-08-15',	 2, 'Genius',	     1, 1200.99 );
+
+-insert into DEPARTMENTS
 +insert into DEPARTMENTS
     values( 1001, 'Sales',		'Berlin' );
--insert into DEPARTMENTS
+-insert into DEPARTMENTS
 +insert into DEPARTMENTS
     values( 1000, 'Developement',	'Stuttgart' );
--insert into DEPARTMENTS
+-insert into DEPARTMENTS
 +insert into DEPARTMENTS
     values( 1002, 'CM and Production',	'Bonn' );
--insert into DEPARTMENTS
+-insert into DEPARTMENTS
 +insert into DEPARTMENTS
     values( 1003, 'Support',		'Chicago' );
--insert into DEPARTMENTS
--   values( 2000, 'Masterminds',		null );
+-insert into DEPARTMENTS
+-   values( 2000, 'Masterminds',		null );
 +insert into DEPARTMENTS
 +   values( 2000, 'Masterminds',		null );
-
-
+
+
  CREATE TABLE LOCATIONS (
 @@ -123,14 +124,14 @@
          STREET   VARCHAR(80),
          NO       CHARACTER(5),
          ZIPCODE  INT
--) ;
+-) ;
 +) ;
-
-
+
+
  insert into LOCATIONS
--   values( 'Berlin', 'Berlin','Siemensdamm', '50a', 10243 );
+-   values( 'Berlin', 'Berlin','Siemensdamm', '50a', 10243 );
 +   values( 'Berlin', 'Berlin','Siemensdamm', '50a', 10243 );
  insert into LOCATIONS
--   values( 'Bonn', 'Bonn','Oberkasselerstrasse', '8', 47112 );
+-   values( 'Bonn', 'Bonn','Oberkasselerstrasse', '8', 47112 );
 +   values( 'Bonn', 'Bonn','Oberkasselerstrasse', '8', 47112 );
  insert into LOCATIONS
--   values( 'Stuttgart', 'Stuttgart','Lorenzweg', '1', 60001 );
+-   values( 'Stuttgart', 'Stuttgart','Lorenzweg', '1', 60001 );
 +   values( 'Stuttgart', 'Stuttgart','Lorenzweg', '1', 60001 );
  insert into LOCATIONS
--   values( 'Chicage', 'Chicago','Bundy Stree', '9996', 70001 );
+-   values( 'Chicage', 'Chicago','Bundy Stree', '9996', 70001 );
 +   values( 'Chicage', 'Chicago','Bundy Stree', '9996', 70001 );
 Index: gnade-1.6.2/samples/sqlite3/demo.adb
 ===================================================================
---- gnade-1.6.2.orig/samples/sqlite3/demo.adb	2009-10-04 09:30:28.000000000 -0400
-+++ gnade-1.6.2/samples/sqlite3/demo.adb	2009-10-04 10:07:09.000000000 -0400
-@@ -1,18 +1,27 @@
+--- gnade-1.6.2.orig/samples/sqlite3/demo.adb	2009-10-05 02:20:57.000000000 -0400
++++ gnade-1.6.2/samples/sqlite3/demo.adb	2009-10-05 03:21:45.000000000 -0400
+@@ -1,18 +1,26 @@
 -with Ada.Text_IO; use Ada.Text_IO;
 -
 -with GNU.DB.SQLite3; use GNU.DB.SQLite3;
 -
 +with Ada.Command_Line; use Ada.Command_Line;
-+with Ada.Containers;
 +with Ada.Directories;
 +with Ada.Text_IO;      use Ada.Text_IO;
 +with GNU.DB.SQLite3;   use GNU.DB.SQLite3;
@@ -212,7 +224,7 @@ Index: gnade-1.6.2/samples/sqlite3/demo.
  is
 -   --Version : constant String := "$Id: demo.adb,v 1.2 2007/08/24 21:22:42 persan Exp $";
 +   use GNU.DB.Support;
-
+
     function List
       (Argc        : Integer;
        Argv        : String_Vectors.Vector;
@@ -231,10 +243,10 @@ Index: gnade-1.6.2/samples/sqlite3/demo.
 +      for I in Natural'(0) .. Natural (Argc) loop
           Put_Line (ColumnNames.Element (I)  & ": " & Argv.Element (I));
        end loop;
-
-@@ -21,14 +30,38 @@
-
-
+
+@@ -21,14 +29,38 @@
+
+
     Db      : aliased GNU.DB.SQLite3.Object;
 -   Table   : Table_Reference := new String_Tables.Vector;
 -   Result  : Return_Value;
@@ -260,7 +272,7 @@ Index: gnade-1.6.2/samples/sqlite3/demo.
 +      Put_Line ("Opening database " & File_Name);
 +      Result := Db.Open (File_Name);
 +   end Recreate_Db;
-
+
 -   Result := Db.Open ("demo.db");
 +   use type String_Tables.Cursor;
 +begin
@@ -275,22 +287,22 @@ Index: gnade-1.6.2/samples/sqlite3/demo.
 +      Set_Exit_Status (Failure);
 +      return;
 +   end if;
-
+
     Put_Line ("Create a table called DEMO with fields bla, ble and blo");
-
-@@ -36,7 +69,7 @@
+
+@@ -36,7 +68,7 @@
     Db.Exec ("CREATE TABLE tare(Name String, Time Float, Data BLOB);");
-
+
     New_Line;
 -   Put_Line ("Insert 10 rows with (100, 200, 300)");
 +   Put_Line ("Insert 10 rows with (<n>, 200, 300)");
-
+
     for I in 1 .. 10 loop
        Db.Exec ("INSERT INTO demo VALUES(" & I'Img & ", 200, 300);");
-@@ -50,23 +83,30 @@
-
+@@ -50,23 +82,30 @@
+
     Result := Db.Get_Table ("SELECT * FROM demo;", Table);
-
+
 -
 ---     for I in Table.Table'Range loop
 ---        for J in Table.Table (I)'Range loop
@@ -319,7 +331,7 @@ Index: gnade-1.6.2/samples/sqlite3/demo.
 +      New_Line;
 +      String_Tables.Next (Row_Cur);
 +   end loop;
-
+
     New_Line;
 -   Put_Line ("2: Using exec_with_callback");
 +   Put_Line ("2: Using exec_with_callback; bla > 4");
@@ -329,5 +341,5 @@ Index: gnade-1.6.2/samples/sqlite3/demo.
 -
 -   Result := Db.Exec ("DROP TABLE demo;");
     Db.Close;
-
+
  end Demo;