unused_variable.patch 1.1 KB

12345678910111213141516171819202122232425262728293031
  1. From 98496827bef6f4619a4a8058443f61ef78b8ab72 Mon Sep 17 00:00:00 2001
  2. From: Roie Danino <[email protected]>
  3. Date: Wed, 7 Feb 2024 14:23:45 +0200
  4. Subject: [PATCH] UCM/PTMALLOC286: added UCS_V_UNUSED attribute to nfences
  5. which might be unused in release
  6. ---
  7. src/ucm/ptmalloc286/malloc.c | 3 ++-
  8. 1 file changed, 2 insertions(+), 1 deletion(-)
  9. diff --git a/src/ucm/ptmalloc286/malloc.c b/src/ucm/ptmalloc286/malloc.c
  10. index e1779967885..45c1aaf8ff3 100644
  11. --- a/src/ucm/ptmalloc286/malloc.c
  12. +++ b/src/ucm/ptmalloc286/malloc.c
  13. @@ -526,6 +526,7 @@ MAX_RELEASE_CHECK_RATE default: 4095 unless not HAVE_MMAP
  14. #endif
  15. #include <ucs/sys/preprocessor.h>
  16. +#include <ucs/sys/compiler_def.h>
  17. /* Version identifier to allow people to support multiple versions */
  18. #ifndef DLMALLOC_VERSION
  19. @@ -3997,7 +3998,7 @@ static void add_segment(mstate m, char* tbase, size_t tsize, flag_t mmapped) {
  20. msegmentptr ss = (msegmentptr)(chunk2mem(sp));
  21. mchunkptr tnext = chunk_plus_offset(sp, ssize);
  22. mchunkptr p = tnext;
  23. - int nfences = 0;
  24. + int UCS_V_UNUSED nfences = 0;
  25. /* reset top to new space */
  26. init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);