Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Merge branch 'ss/nedmalloc-compilation'
author
Junio C Hamano
<gitster@pobox.com>
Thu, 3 Jan 2013 18:14:10 +0000
(10:14 -0800)
committer
Junio C Hamano
<gitster@pobox.com>
Thu, 3 Jan 2013 18:14:10 +0000
(10:14 -0800)
* ss/nedmalloc-compilation:
nedmalloc: Fix a compile warning (exposed as error) with GCC 4.7.2
compat/nedmalloc/nedmalloc.c
patch
|
blob
|
history
raw
(from parent 1:
cd46f2e
)
diff --git
a/compat/nedmalloc/nedmalloc.c
b/compat/nedmalloc/nedmalloc.c
index d9a17a8057c5740edea3d7888c4607e63af9eddd..91c4e7f27b4063c7ceffeeb1cd43530ce18cf096 100644
(file)
--- a/
compat/nedmalloc/nedmalloc.c
+++ b/
compat/nedmalloc/nedmalloc.c
@@
-603,7
+603,10
@@
static NOINLINE mstate FindMSpace(nedpool *p, threadcache *tc, int *lastUsed, si
}
/* We really want to make sure this goes into memory now but we
have to be careful of breaking aliasing rules, so write it twice */
- *((volatile struct malloc_state **) &p->m[end])=p->m[end]=temp;
+ {
+ volatile struct malloc_state **_m=(volatile struct malloc_state **) &p->m[end];
+ *_m=(p->m[end]=temp);
+ }
ACQUIRE_LOCK(&p->m[end]->mutex);
/*printf("Created mspace idx %d\n", end);*/
RELEASE_LOCK(&p->mutex);