summaryrefslogtreecommitdiff
path: root/cord
diff options
context:
space:
mode:
authorIvan Maidanski <ivmai@mail.ru>2019-07-26 00:28:09 +0300
committerIvan Maidanski <ivmai@mail.ru>2019-07-26 00:28:09 +0300
commitaaf392b6c89ac900226f1090f3ed4605202e6046 (patch)
tree9bd5b72057a32f3126c3ab5eee5f58d52e268dcc /cord
parent0fd5c56db848259a68ad73e71baafad85ef2dc42 (diff)
downloadbdwgc-aaf392b6c89ac900226f1090f3ed4605202e6046.tar.gz
Eliminate 'conversion from int to void*' MS VC warning in cordtest (x64)
* cord/tests/cordtest.c (test_fn, test_basics): Cast 13 to void* thru GC_word type.
Diffstat (limited to 'cord')
-rw-r--r--cord/tests/cordtest.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/cord/tests/cordtest.c b/cord/tests/cordtest.c
index 399141e4..a41600c0 100644
--- a/cord/tests/cordtest.c
+++ b/cord/tests/cordtest.c
@@ -40,7 +40,8 @@ int count;
int test_fn(char c, void * client_data)
{
- if (client_data != (void *)13) ABORT("bad client data");
+ if (client_data != (void *)(GC_word)13)
+ ABORT("bad client data");
if (count < 64*1024+1) {
if ((count & 1) == 0) {
if (c != 'b') ABORT("bad char");
@@ -81,7 +82,8 @@ void test_basics(void)
if (CORD_len(x) != 128*1024+1) ABORT("bad length");
count = 0;
- if (CORD_iter5(x, 64*1024-1, test_fn, CORD_NO_FN, (void *)13) == 0) {
+ if (CORD_iter5(x, 64*1024-1, test_fn, CORD_NO_FN,
+ (void *)(GC_word)13) == 0) {
ABORT("CORD_iter5 failed");
}
if (count != 64*1024 + 2) ABORT("CORD_iter5 failed");
@@ -89,7 +91,7 @@ void test_basics(void)
count = 0;
CORD_set_pos(p, x, 64*1024-1);
while(CORD_pos_valid(p)) {
- (void) test_fn(CORD_pos_fetch(p), (void *)13);
+ (void)test_fn(CORD_pos_fetch(p), (void *)(GC_word)13);
CORD_next(p);
}
if (count != 64*1024 + 2) ABORT("Position based iteration failed");
@@ -113,7 +115,8 @@ void test_basics(void)
if (CORD_len(x) != 128*1024+1) ABORT("bad length");
count = 0;
- if (CORD_iter5(x, 64*1024-1, test_fn, CORD_NO_FN, (void *)13) == 0) {
+ if (CORD_iter5(x, 64*1024-1, test_fn, CORD_NO_FN,
+ (void *)(GC_word)13) == 0) {
ABORT("CORD_iter5 failed");
}
if (count != 64*1024 + 2) ABORT("CORD_iter5 failed");