nedmalloc: avoid compiler warning about unused value
commit70597e838601ee6be5c43ece255c9df47f8fe9a2
authorRené Scharfe <l.s.r@web.de>
Wed, 7 Aug 2019 13:09:02 +0000 (7 15:09 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 7 Aug 2019 18:54:55 +0000 (7 11:54 -0700)
treee3efbf986075453bb9d23f5c0b34d6fe19a90c93
parentc9b9c09dae175f75bed4363cc6278c3f0cb3b9dd
nedmalloc: avoid compiler warning about unused value

Cast the evaluated value of the macro INITIAL_LOCK to void to instruct
the compiler that we're not interested in said value nor the following
warning:

In file included from compat/nedmalloc/nedmalloc.c:63:
compat/nedmalloc/malloc.c.h: In function ‘init_user_mstate’:
compat/nedmalloc/malloc.c.h:1706:62: error: right-hand operand of comma expression has no effect [-Werror=unused-value]
 1706 | #define INITIAL_LOCK(sl)      (memset(sl, 0, sizeof(MLOCK_T)), 0)
      |                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
compat/nedmalloc/malloc.c.h:5020:3: note: in expansion of macro ‘INITIAL_LOCK’
 5020 |   INITIAL_LOCK(&m->mutex);
      |   ^~~~~~~~~~~~

Signed-off-by: René Scharfe <l.s.r@web.de>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
compat/nedmalloc/malloc.c.h