From 2030767b213187816e40fee761bf17cc321ed3a2 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Sun, 1 Mar 2015 13:45:27 -0500 Subject: [PATCH] regressions/ck_rhs: -Wcast-qual clean-up. --- regressions/ck_rhs/validate/serial.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/regressions/ck_rhs/validate/serial.c b/regressions/ck_rhs/validate/serial.c index d11b4e4..ef9365f 100644 --- a/regressions/ck_rhs/validate/serial.c +++ b/regressions/ck_rhs/validate/serial.c @@ -150,7 +150,8 @@ run_test(unsigned int is, unsigned int ad) if (i & 1) { if (ck_rhs_put_unique(&hs[j], h, test[i]) == false) ck_error("ERROR [%zu]: Failed to insert unique (%s)\n", j, test[i]); - } else if (ck_rhs_apply(&hs[j], h, test[i], test_unique, (char *)test[i]) == false) { + } else if (ck_rhs_apply(&hs[j], h, test[i], test_unique, + (void *)(uintptr_t)test[i]) == false) { ck_error("ERROR: Failed to apply for insertion.\n"); } @@ -161,7 +162,8 @@ run_test(unsigned int is, unsigned int ad) ck_error("ERROR: Failed to remove apply.\n"); } - if (ck_rhs_apply(&hs[j], h, test[i], test_negative, (char *)test[i]) == false) + if (ck_rhs_apply(&hs[j], h, test[i], test_negative, + (void *)(uintptr_t)test[i]) == false) ck_error("ERROR: Failed to apply.\n"); break; @@ -268,8 +270,10 @@ run_test(unsigned int is, unsigned int ad) ck_error("ERROR [%u]: Invalid &hs[j]: %s != %s\n", (char *)r, test[i], is); } /* Attempt in-place mutation. */ - if (ck_rhs_apply(&hs[j], h, test[i], test_ip, (void *)test[i]) == false) + if (ck_rhs_apply(&hs[j], h, test[i], test_ip, + (void *)(uintptr_t)test[i]) == false) { ck_error("ERROR [%u]: Failed to apply: %s != %s\n", is, (char *)r, test[i]); + } d = ck_rhs_get(&hs[j], h, test[i]) != NULL; if (d == false)