summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorRyan Bloom <rbb@apache.org>2004-03-13 00:33:24 +0000
committerRyan Bloom <rbb@apache.org>2004-03-13 00:33:24 +0000
commit75da701e57c9acf2beeae2298cd77a9015ed1e56 (patch)
treeebba09a115022efa930e64640c3bfa59bae99972 /test
parent012ac8922cd5e0248a66983dc9886be510f4710f (diff)
downloadapr-75da701e57c9acf2beeae2298cd77a9015ed1e56.tar.gz
Declare variables at the beginning of functions, I'm surprised this
actually compiled on Linux. git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@64973 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/testatomic.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/test/testatomic.c b/test/testatomic.c
index 92c314179..b92baae51 100644
--- a/test/testatomic.c
+++ b/test/testatomic.c
@@ -149,12 +149,13 @@ static void test_wrap_zero(CuTest *tc)
apr_uint32_t y32;
apr_uint32_t rv;
apr_uint32_t minus1 = -1;
+ char *str;
apr_atomic_set32(&y32, 0);
rv = apr_atomic_dec32(&y32);
CuAssert(tc, "apr_atomic_dec32 on zero returned zero.", rv != 0);
- char *str = apr_psprintf(p, "zero wrap failed: 0 - 1 = %d", y32);
+ str = apr_psprintf(p, "zero wrap failed: 0 - 1 = %d", y32);
CuAssert(tc, str, y32 == minus1);
}
@@ -163,11 +164,12 @@ static void test_inc_neg1(CuTest *tc)
apr_uint32_t y32 = -1;
apr_uint32_t minus1 = -1;
apr_uint32_t rv;
+ char *str;
rv = apr_atomic_inc32(&y32);
CuAssert(tc, "apr_atomic_dec32 on zero returned zero.", rv == minus1);
- char *str = apr_psprintf(p, "zero wrap failed: -1 + 1 = %d", y32);
+ str = apr_psprintf(p, "zero wrap failed: -1 + 1 = %d", y32);
CuAssert(tc, str, y32 == 0);
}