Skip to content

Commit 4336fdb

Browse files
committed
Merge branch 'rs/nedalloc-fixlets'
Compilation fix. * rs/nedalloc-fixlets: nedmalloc: avoid compiler warning about unused value nedmalloc: do assignments only after the declaration section
2 parents 8ae7a46 + 70597e8 commit 4336fdb

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

compat/nedmalloc/malloc.c.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1755,10 +1755,10 @@ static FORCEINLINE void pthread_release_lock (MLOCK_T *sl) {
17551755
assert(sl->l != 0);
17561756
assert(sl->threadid == CURRENT_THREAD);
17571757
if (--sl->c == 0) {
1758-
sl->threadid = 0;
17591758
volatile unsigned int* lp = &sl->l;
17601759
int prev = 0;
17611760
int ret;
1761+
sl->threadid = 0;
17621762
__asm__ __volatile__ ("lock; xchgl %0, %1"
17631763
: "=r" (ret)
17641764
: "m" (*(lp)), "0"(prev)
@@ -3066,7 +3066,7 @@ static int init_mparams(void) {
30663066
#if !ONLY_MSPACES
30673067
/* Set up lock for main malloc area */
30683068
gm->mflags = mparams.default_mflags;
3069-
INITIAL_LOCK(&gm->mutex);
3069+
(void)INITIAL_LOCK(&gm->mutex);
30703070
#endif
30713071

30723072
#if (FOOTERS && !INSECURE)
@@ -5017,7 +5017,7 @@ static mstate init_user_mstate(char* tbase, size_t tsize) {
50175017
mchunkptr msp = align_as_chunk(tbase);
50185018
mstate m = (mstate)(chunk2mem(msp));
50195019
memset(m, 0, msize);
5020-
INITIAL_LOCK(&m->mutex);
5020+
(void)INITIAL_LOCK(&m->mutex);
50215021
msp->head = (msize|PINUSE_BIT|CINUSE_BIT);
50225022
m->seg.base = m->least_addr = tbase;
50235023
m->seg.size = m->footprint = m->max_footprint = tsize;

0 commit comments

Comments
 (0)