Suppress unused variable warning in dlmalloc.c (#843)
authorRichard Barnes <rbarnes@umn.edu>
Sun, 15 Sep 2024 11:39:51 +0000 (07:39 -0400)
committerGitHub <noreply@github.com>
Sun, 15 Sep 2024 11:39:51 +0000 (07:39 -0400)
Allows `-Wunused-but-set-variable` to pass

src/dlmalloc.c

index c61ef9240abf33bb9e72ad3f9017fa28bc7cc88e..17193a0db3bb4576b593aa148c559849271f3a2e 100644 (file)
@@ -3388,6 +3388,7 @@ static void add_segment(mstate m, char* tbase, size_t tsize, flag_t mmapped) {
   mchunkptr tnext = chunk_plus_offset(sp, ssize);
   mchunkptr p = tnext;
   int nfences = 0;
+  (void)nfences; // Suppress unused variable warning
 
   /* reset top to new space */
   init_top(m, (mchunkptr)tbase, tsize - TOP_FOOT_SIZE);