diff options
author | Junio C Hamano <gitster@pobox.com> | 2013-01-03 10:14:10 -0800 |
---|---|---|
committer | Junio C Hamano <gitster@pobox.com> | 2013-01-03 10:14:10 -0800 |
commit | 0266f4688ce2eab25629a2aa4ccd5032944311c8 (patch) | |
tree | 27e637f7f9b0d4e31ecb64016fb7d04d5066b6d4 /compat | |
parent | cd46f2e59de2df74844c9c594bfbfcdea24acd23 (diff) | |
parent | 8e679e08a6e12e183aeb068a2ff5d75599d6433d (diff) | |
download | git-0266f4688ce2eab25629a2aa4ccd5032944311c8.tar.gz git-0266f4688ce2eab25629a2aa4ccd5032944311c8.tar.xz |
Merge branch 'ss/nedmalloc-compilation'
* ss/nedmalloc-compilation:
nedmalloc: Fix a compile warning (exposed as error) with GCC 4.7.2
Diffstat (limited to 'compat')
-rw-r--r-- | compat/nedmalloc/nedmalloc.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/compat/nedmalloc/nedmalloc.c b/compat/nedmalloc/nedmalloc.c index d9a17a805..91c4e7f27 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); |