Author: Armin Rigo <[email protected]>
Branch: use-gcc
Changeset: r1890:8fc3a9b12b15
Date: 2015-07-02 15:27 +0100
http://bitbucket.org/pypy/stmgc/changeset/8fc3a9b12b15/
Log: Silence more warnings
diff --git a/c8/demo/demo_random.c b/c8/demo/demo_random.c
--- a/c8/demo/demo_random.c
+++ b/c8/demo/demo_random.c
@@ -463,6 +463,7 @@
stm_unregister_thread_local(&stm_thread_local);
status = sem_post(&done); assert(status == 0);
+ (void)status;
return NULL;
}
diff --git a/c8/stm/locks.h b/c8/stm/locks.h
--- a/c8/stm/locks.h
+++ b/c8/stm/locks.h
@@ -10,11 +10,14 @@
of modification locks!
*/
-typedef struct {
- pthread_rwlock_t lock;
+typedef union {
+ struct {
+ pthread_rwlock_t lock;
#ifndef NDEBUG
- volatile bool write_locked;
+ volatile bool write_locked;
#endif
+ };
+ char _pad[64];
} modification_lock_t __attribute__((aligned(64)));
static modification_lock_t _modlocks[NB_SEGMENTS - 1];
diff --git a/c8/stm/nursery.c b/c8/stm/nursery.c
--- a/c8/stm/nursery.c
+++ b/c8/stm/nursery.c
@@ -477,6 +477,7 @@
/* reset the nursery by zeroing it */
char *realnursery;
realnursery = REAL_ADDRESS(pseg->pub.segment_base, _stm_nursery_start);
+ (void)realnursery;
#if _STM_NURSERY_ZEROED
memset(realnursery, 0, nursery_used);
diff --git a/c8/stm/queue.c b/c8/stm/queue.c
--- a/c8/stm/queue.c
+++ b/c8/stm/queue.c
@@ -52,7 +52,7 @@
stm_queue_t *stm_queue_create(void)
{
- void *mem;
+ void *mem = NULL;
int result = posix_memalign(&mem, 64, sizeof(stm_queue_t));
assert(result == 0);
(void)result;
_______________________________________________
pypy-commit mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-commit