summaryrefslogtreecommitdiff
path: root/compat/nedmalloc/nedmalloc.c
diff options
context:
space:
mode:
authorLibravatar Junio C Hamano <gitster@pobox.com>2013-01-08 11:17:07 -0800
committerLibravatar Junio C Hamano <gitster@pobox.com>2013-01-08 11:17:07 -0800
commitb48b632cda2d8f74524c448027e867089ddcb44a (patch)
treecb041b5d7bc58afabced21c9a86ac8f334a079c4 /compat/nedmalloc/nedmalloc.c
parentMerge branch 'jc/maint-fnmatch-old-style-definition' into maint (diff)
parentnedmalloc: Fix a compile warning (exposed as error) with GCC 4.7.2 (diff)
downloadtgif-b48b632cda2d8f74524c448027e867089ddcb44a.tar.xz
Merge branch 'ss/nedmalloc-compilation' into maint
* ss/nedmalloc-compilation: nedmalloc: Fix a compile warning (exposed as error) with GCC 4.7.2
Diffstat (limited to 'compat/nedmalloc/nedmalloc.c')
-rw-r--r--compat/nedmalloc/nedmalloc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/compat/nedmalloc/nedmalloc.c b/compat/nedmalloc/nedmalloc.c
index d9a17a8057..91c4e7f27b 100644
--- 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);