From 5969bc913916822dfde033ee452be622dbc313ea Mon Sep 17 00:00:00 2001 From: Andrea Mazzoleni Date: Thu, 8 Oct 2015 22:29:55 +0200 Subject: [PATCH] Remove some conversion warnings --- cmdline/selftest.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cmdline/selftest.c b/cmdline/selftest.c index 365dc28f..bb97b857 100644 --- a/cmdline/selftest.c +++ b/cmdline/selftest.c @@ -387,7 +387,7 @@ static void test_tommy(void) tommy_tree_init(&tree, tommy_test_compare); for (i = 0; i < TOMMY_SIZE; ++i) - tommy_tree_insert(&tree, &node[i], (void*)(i+1)); + tommy_tree_insert(&tree, &node[i], (void*)(uintptr_t)(i+1)); /* try to insert a duplicate, count should not change */ if (tommy_tree_insert(&tree, &node[TOMMY_SIZE], (void*)1) != (void*)1) @@ -425,11 +425,11 @@ static void test_tommy(void) tommy_tree_remove_existing(&tree, &node[i]); for (i = 0; i < TOMMY_SIZE / 2; ++i) - if (tommy_tree_remove(&tree, (void*)(i+1)) != 0) + if (tommy_tree_remove(&tree, (void*)(uintptr_t)(i+1)) != 0) goto bail; for (i = TOMMY_SIZE / 2; i < TOMMY_SIZE; ++i) - if (tommy_tree_remove(&tree, (void*)(i+1)) == 0) + if (tommy_tree_remove(&tree, (void*)(uintptr_t)(i+1)) == 0) goto bail; if (tommy_tree_count(&tree) != 0)