apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From traw...@apache.org
Subject svn commit: r1389077 - in /apr/apr/trunk/test: testfile.c testlockperf.c testmemcache.c testmmap.c
Date Sun, 23 Sep 2012 15:23:42 GMT
Author: trawick
Date: Sun Sep 23 15:23:42 2012
New Revision: 1389077

URL: http://svn.apache.org/viewvc?rev=1389077&view=rev
Log:
easy fixes for a few warnings about unused variables

Modified:
    apr/apr/trunk/test/testfile.c
    apr/apr/trunk/test/testlockperf.c
    apr/apr/trunk/test/testmemcache.c
    apr/apr/trunk/test/testmmap.c

Modified: apr/apr/trunk/test/testfile.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testfile.c?rev=1389077&r1=1389076&r2=1389077&view=diff
==============================================================================
--- apr/apr/trunk/test/testfile.c (original)
+++ apr/apr/trunk/test/testfile.c Sun Sep 23 15:23:42 2012
@@ -749,6 +749,7 @@ static void test_writev_buffered_seek(ab
                                      APR_OS_DEFAULT, p));
 
     rv = apr_file_read(f, str, &nbytes);
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     ABTS_STR_EQUAL(tc, TESTSTR, str);
     APR_ASSERT_SUCCESS(tc, "buffered seek", apr_file_seek(f, APR_SET, &off));
 
@@ -1006,6 +1007,7 @@ static void test_xthread(abts_case *tc, 
         apr_off_t offset = 0;
 
         rv = apr_file_seek(f, APR_END, &offset);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     }
 
     APR_ASSERT_SUCCESS(tc, "more writes should succeed",
@@ -1016,6 +1018,7 @@ static void test_xthread(abts_case *tc, 
         apr_off_t offset = 0;
         
         rv = apr_file_seek(f, APR_SET, &offset);
+        ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     }
     
     apr_file_read_full(f, buf, sizeof(buf), NULL);

Modified: apr/apr/trunk/test/testlockperf.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testlockperf.c?rev=1389077&r1=1389076&r2=1389077&view=diff
==============================================================================
--- apr/apr/trunk/test/testlockperf.c (original)
+++ apr/apr/trunk/test/testlockperf.c Sun Sep 23 15:23:42 2012
@@ -226,7 +226,6 @@ int main(int argc, const char * const *a
 {
     apr_status_t rv;
     char errmsg[200];
-    const char *lockname = "multi.lock";
     apr_getopt_t *opt;
     char optchar;
     const char *optarg;
@@ -245,13 +244,10 @@ int main(int argc, const char * const *a
         exit(-1);
     }
         
-    while ((rv = apr_getopt(opt, "vf:", &optchar, &optarg)) == APR_SUCCESS) {
+    while ((rv = apr_getopt(opt, "v", &optchar, &optarg)) == APR_SUCCESS) {
         if (optchar == 'v') {
             verbose = 1;
         }
-        if (optchar == 'f') {
-            lockname = optarg;
-        }
     }
 
     if (rv != APR_SUCCESS && rv != APR_EOF) {

Modified: apr/apr/trunk/test/testmemcache.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testmemcache.c?rev=1389077&r1=1389076&r2=1389077&view=diff
==============================================================================
--- apr/apr/trunk/test/testmemcache.c (original)
+++ apr/apr/trunk/test/testmemcache.c Sun Sep 23 15:23:42 2012
@@ -488,7 +488,7 @@ static void test_memcache_setget(abts_ca
     apr_status_t rv;
     apr_memcache_t *memcache;
     apr_memcache_server_t *server;
-    apr_hash_t *tdata, *values;
+    apr_hash_t *tdata;
     apr_hash_index_t *hi;
     char *result;
     apr_size_t len;
@@ -503,7 +503,6 @@ static void test_memcache_setget(abts_ca
     ABTS_ASSERT(tc, "server add failed", rv == APR_SUCCESS);
 
     tdata = apr_hash_make(pool);
-    values = apr_hash_make(pool);
 
     create_test_hash(pool, tdata);
 

Modified: apr/apr/trunk/test/testmmap.c
URL: http://svn.apache.org/viewvc/apr/apr/trunk/test/testmmap.c?rev=1389077&r1=1389076&r2=1389077&view=diff
==============================================================================
--- apr/apr/trunk/test/testmmap.c (original)
+++ apr/apr/trunk/test/testmmap.c Sun Sep 23 15:23:42 2012
@@ -125,6 +125,7 @@ static void test_mmap_offset(abts_case *
     ABTS_PTR_NOTNULL(tc, themmap);
     rv = apr_mmap_offset(&addr, themmap, 5);
 
+    ABTS_INT_EQUAL(tc, APR_SUCCESS, rv);
     /* Must use nEquals since the string is not guaranteed to be NULL terminated */
     ABTS_STR_NEQUAL(tc, addr, TEST_STRING + 5, thisfsize-5);
 }



Mime
View raw message