apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From roo...@apache.org
Subject svn commit: r232567 - in /apr/apr-util/trunk/test: dbd.c testdbd.c
Date Sun, 14 Aug 2005 02:00:52 GMT
Author: rooneg
Date: Sat Aug 13 19:00:50 2005
New Revision: 232567

URL: http://svn.apache.org/viewcvs?rev=232567&view=rev
Log:
Clean up warnings in the dbd tests caused by r231463.

* test/testdbd.c
  (test_statement,
   create_table,
   drop_table,
   delete_rows,
   insert_data,
   select_rows,
   test_dbd_generic): make the dbd driver argument const.
  (test_dbd_sqlite2,
   test_dbd_sqlite3): make the dbd driver variable const.

* test/dbd.c
  (create_table,
   drop_table,
   insert_rows,
   invalid_op,
   select_sequential,
   select_random,
   test_transactions,
   test_pselect,
   test_pquery): make dbd driver argument const.
  (main): make dbd driver variable const.

Modified:
    apr/apr-util/trunk/test/dbd.c
    apr/apr-util/trunk/test/testdbd.c

Modified: apr/apr-util/trunk/test/dbd.c
URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/test/dbd.c?rev=232567&r1=232566&r2=232567&view=diff
==============================================================================
--- apr/apr-util/trunk/test/dbd.c (original)
+++ apr/apr-util/trunk/test/dbd.c Sat Aug 13 19:00:50 2005
@@ -32,7 +32,7 @@
     fflush(stdout);
 
 static int create_table(apr_pool_t* pool, apr_dbd_t* handle,
-                        apr_dbd_driver_t* driver)
+                        const apr_dbd_driver_t* driver)
 {
     int rv = 0;
     int nrows;
@@ -44,7 +44,7 @@
     return rv;
 }
 static int drop_table(apr_pool_t* pool, apr_dbd_t* handle,
-                      apr_dbd_driver_t* driver)
+                      const apr_dbd_driver_t* driver)
 {
     int rv = 0;
     int nrows;
@@ -53,7 +53,7 @@
     return rv;
 }
 static int insert_rows(apr_pool_t* pool, apr_dbd_t* handle,
-                       apr_dbd_driver_t* driver)
+                       const apr_dbd_driver_t* driver)
 {
     int i;
     int rv = 0;
@@ -91,7 +91,7 @@
     return rv;
 }
 static int invalid_op(apr_pool_t* pool, apr_dbd_t* handle,
-                      apr_dbd_driver_t* driver)
+                      const apr_dbd_driver_t* driver)
 {
     int rv = 0;
     int nrows;
@@ -105,7 +105,7 @@
     return rv;
 }
 static int select_sequential(apr_pool_t* pool, apr_dbd_t* handle,
-                             apr_dbd_driver_t* driver)
+                             const apr_dbd_driver_t* driver)
 {
     int rv = 0;
     int i = 0;
@@ -137,7 +137,7 @@
     return (rv == -1) ? 0 : 1;
 }
 static int select_random(apr_pool_t* pool, apr_dbd_t* handle,
-                         apr_dbd_driver_t* driver)
+                         const apr_dbd_driver_t* driver)
 {
     int rv = 0;
     int n;
@@ -193,7 +193,7 @@
     return rv;
 }
 static int test_transactions(apr_pool_t* pool, apr_dbd_t* handle,
-                             apr_dbd_driver_t* driver)
+                             const apr_dbd_driver_t* driver)
 {
     int rv = 0;
     int nrows;
@@ -266,7 +266,7 @@
     return rv;
 }
 static int test_pselect(apr_pool_t* pool, apr_dbd_t* handle,
-                        apr_dbd_driver_t* driver)
+                        const apr_dbd_driver_t* driver)
 {
     int rv = 0;
     int i, n;
@@ -310,7 +310,7 @@
     return (rv == -1) ? 0 : 1;
 }
 static int test_pquery(apr_pool_t* pool, apr_dbd_t* handle,
-                       apr_dbd_driver_t* driver)
+                       const apr_dbd_driver_t* driver)
 {
     int rv = 0;
     const char *query = "INSERT INTO apr_dbd_test VALUES (%s, %s, %d)";
@@ -345,7 +345,7 @@
     const char *params;
     apr_pool_t *pool = NULL;
     apr_dbd_t *sql = NULL;
-    apr_dbd_driver_t *driver = NULL;
+    const apr_dbd_driver_t *driver = NULL;
     int rv;
 
     apr_initialize();

Modified: apr/apr-util/trunk/test/testdbd.c
URL: http://svn.apache.org/viewcvs/apr/apr-util/trunk/test/testdbd.c?rev=232567&r1=232566&r2=232567&view=diff
==============================================================================
--- apr/apr-util/trunk/test/testdbd.c (original)
+++ apr/apr-util/trunk/test/testdbd.c Sat Aug 13 19:00:50 2005
@@ -32,7 +32,7 @@
 
 #if APU_HAVE_SQLITE2 || APU_HAVE_SQLITE3
 static void test_statement(abts_case *tc, apr_dbd_t* handle, 
-                           apr_dbd_driver_t* driver, const char* sql)
+                           const apr_dbd_driver_t* driver, const char* sql)
 {
     int nrows;
     apr_status_t rv;
@@ -43,7 +43,7 @@
 }
 
 static void create_table(abts_case *tc, apr_dbd_t* handle, 
-                              apr_dbd_driver_t* driver)
+                         const apr_dbd_driver_t* driver)
 {
     const char *sql = "CREATE TABLE apr_dbd_test ("
                              "col1 varchar(40) not null,"
@@ -54,14 +54,14 @@
 }
 
 static void drop_table(abts_case *tc, apr_dbd_t* handle, 
-                              apr_dbd_driver_t* driver)
+                       const apr_dbd_driver_t* driver)
 {
     const char *sql = "DROP TABLE apr_dbd_test";
     test_statement(tc, handle, driver, sql);
 }
 
 static void delete_rows(abts_case *tc, apr_dbd_t* handle, 
-                              apr_dbd_driver_t* driver)
+                        const apr_dbd_driver_t* driver)
 {
     const char *sql = "DELETE FROM apr_dbd_test";
     test_statement(tc, handle, driver, sql);
@@ -69,7 +69,7 @@
 
 
 static void insert_data(abts_case *tc, apr_dbd_t* handle, 
-                        apr_dbd_driver_t* driver, int count)
+                        const apr_dbd_driver_t* driver, int count)
 {
     apr_pool_t* pool = p;
     const char* sql = "INSERT INTO apr_dbd_test VALUES('%d', '%d', %d)";
@@ -87,7 +87,7 @@
 }
 
 static void select_rows(abts_case *tc, apr_dbd_t* handle, 
-                        apr_dbd_driver_t* driver, int count)
+                        const apr_dbd_driver_t* driver, int count)
 {
     apr_status_t rv;
     apr_pool_t* pool = p;
@@ -137,7 +137,7 @@
 }
 
 static void test_dbd_generic(abts_case *tc, apr_dbd_t* handle, 
-                             apr_dbd_driver_t* driver)
+                             const apr_dbd_driver_t* driver)
 {
     void* native;
     apr_pool_t *pool = p;
@@ -166,7 +166,7 @@
 {
     apr_pool_t *pool = p;
     apr_status_t rv;
-    apr_dbd_driver_t* driver = NULL;
+    const apr_dbd_driver_t* driver = NULL;
     apr_dbd_t* handle = NULL;
 
     rv = apr_dbd_get_driver(pool, "sqlite2", &driver);
@@ -188,7 +188,7 @@
 {
     apr_pool_t *pool = p;
     apr_status_t rv;
-    apr_dbd_driver_t* driver = NULL;
+    const apr_dbd_driver_t* driver = NULL;
     apr_dbd_t* handle = NULL;
 
     rv = apr_dbd_get_driver(pool, "sqlite3", &driver);



Mime
View raw message