From 959e5fd744a02a6bd2d3c18643c55d00b0fd6131 Mon Sep 17 00:00:00 2001 From: Samy Al Bahra Date: Sun, 1 Mar 2015 13:52:11 -0500 Subject: [PATCH] regressions/ck_epoch: -Wcast-qual clean-up. --- regressions/ck_epoch/validate/ck_epoch_synchronize.c | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/regressions/ck_epoch/validate/ck_epoch_synchronize.c b/regressions/ck_epoch/validate/ck_epoch_synchronize.c index 3ce2de8..88fdf76 100644 --- a/regressions/ck_epoch/validate/ck_epoch_synchronize.c +++ b/regressions/ck_epoch/validate/ck_epoch_synchronize.c @@ -88,13 +88,7 @@ read_thread(void *unused CK_CC_UNUSED) unsigned int j; ck_epoch_record_t record CK_CC_CACHELINE; ck_stack_entry_t *cursor; - - /* - * This is redundant post-incremented in order to silence some - * irrelevant GCC warnings. It is volatile in order to prevent - * elimination. - */ - volatile ck_stack_entry_t *n; + ck_stack_entry_t *n; ck_epoch_register(&stack_epoch, &record); @@ -121,9 +115,7 @@ read_thread(void *unused CK_CC_UNUSED) continue; n = CK_STACK_NEXT(cursor); - - /* Force n use. */ - j += ((uintptr_t)(void *)n & 0) + 1; + j += ck_pr_load_ptr(&n) != NULL; } ck_epoch_end(&stack_epoch, &record);