summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMike Hommey <mh@glandium.org>2014-05-21 09:13:21 (GMT)
committerJason Evans <je@fb.com>2014-05-27 22:26:28 (GMT)
commit3a730dfd5062ecd6fc46b68f28342e14b461f560 (patch)
tree589d6072218dba6c5b27b7eab4ace4853dabfb9d
parent86e2e703ffb3cc17e05af816df8895db62a9272e (diff)
downloadjemalloc-3a730dfd5062ecd6fc46b68f28342e14b461f560.zip
jemalloc-3a730dfd5062ecd6fc46b68f28342e14b461f560.tar.gz
jemalloc-3a730dfd5062ecd6fc46b68f28342e14b461f560.tar.bz2
Avoid pointer arithmetic on void* in test/integration/rallocx.c
-rw-r--r--test/integration/rallocx.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/integration/rallocx.c b/test/integration/rallocx.c
index ee21aed..e78e02f 100644
--- a/test/integration/rallocx.c
+++ b/test/integration/rallocx.c
@@ -95,7 +95,8 @@ TEST_BEGIN(test_zero)
"Expected zeroed memory");
}
if (psz != qsz) {
- memset(q+psz, FILL_BYTE, qsz-psz);
+ memset((void *)(uintptr_t)q+psz, FILL_BYTE,
+ qsz-psz);
psz = qsz;
}
p = q;
@@ -159,8 +160,9 @@ TEST_BEGIN(test_lg_align_and_zero)
} else {
assert_false(validate_fill(q, 0, 0, MAX_VALIDATE),
"Expected zeroed memory");
- assert_false(validate_fill(q+sz-MAX_VALIDATE, 0, 0,
- MAX_VALIDATE), "Expected zeroed memory");
+ assert_false(validate_fill(
+ (void *)(uintptr_t)q+sz-MAX_VALIDATE,
+ 0, 0, MAX_VALIDATE), "Expected zeroed memory");
}
p = q;
}