diff --git a/regressions/ck_epoch/validate/ck_stack_read.c b/regressions/ck_epoch/validate/ck_stack_read.c index c6cc055..5888388 100644 --- a/regressions/ck_epoch/validate/ck_stack_read.c +++ b/regressions/ck_epoch/validate/ck_stack_read.c @@ -73,6 +73,12 @@ read_thread(void *unused CK_CC_UNUSED) unsigned int j; ck_epoch_record_t record; 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_epoch_register(&stack_epoch, &record); @@ -98,6 +104,7 @@ read_thread(void *unused CK_CC_UNUSED) CK_STACK_FOREACH(&stack, cursor) { n = cursor; j++; + n++; } ck_epoch_end(&record); diff --git a/regressions/ck_hp/validate/ck_hp_stack.c b/regressions/ck_hp/validate/ck_hp_stack.c index 6b361fd..77eb70f 100644 --- a/regressions/ck_hp/validate/ck_hp_stack.c +++ b/regressions/ck_hp/validate/ck_hp_stack.c @@ -65,7 +65,7 @@ CK_STACK_CONTAINER(struct node, stack_entry, stack_container) static struct affinity a; static void * -thread(void *unused) +thread(void *unused CK_CC_UNUSED) { struct node **entry, *e; unsigned int i; diff --git a/regressions/ck_hp/validate/nbds_haz_test.c b/regressions/ck_hp/validate/nbds_haz_test.c index b9cd186..9b8a12a 100644 --- a/regressions/ck_hp/validate/nbds_haz_test.c +++ b/regressions/ck_hp/validate/nbds_haz_test.c @@ -139,7 +139,7 @@ stack_pop_mpmc(ck_hp_record_t *record, struct stack *target) } static void * -thread(void *unused) +thread(void *unused CK_CC_UNUSED) { struct node *entry, *e; unsigned int i; diff --git a/regressions/ck_sequence/validate/ck_sequence.c b/regressions/ck_sequence/validate/ck_sequence.c index 0316e5a..2ac0139 100644 --- a/regressions/ck_sequence/validate/ck_sequence.c +++ b/regressions/ck_sequence/validate/ck_sequence.c @@ -49,7 +49,7 @@ static unsigned int barrier; static struct affinity affinerator; static void * -consumer(void *unused) +consumer(void *unused CK_CC_UNUSED) { struct example copy; uint32_t version; diff --git a/regressions/ck_stack/benchmark/latency.c b/regressions/ck_stack/benchmark/latency.c index bc5a9c3..f2ffe8e 100644 --- a/regressions/ck_stack/benchmark/latency.c +++ b/regressions/ck_stack/benchmark/latency.c @@ -40,6 +40,11 @@ #define STEPS 40000 #endif +/* + * Note the redundant post-increment of r. This is to silence + * some irrelevant GCC warnings. + */ + static ck_stack_t stack; int @@ -85,6 +90,7 @@ main(void) a += e - s; } printf(" spinlock_pop: %16" PRIu64 "\n", a / STEPS / ENTRIES); + r++; #ifdef CK_F_STACK_PUSH_UPMC a = 0; @@ -163,6 +169,7 @@ main(void) a += e - s; } printf(" ck_stack_pop_mpmc: %16" PRIu64 "\n", a / STEPS / (sizeof(entry) / sizeof(*entry))); + r++; #endif return 0;