Closed jefftrull closed 1 year ago
Thanks for the report, but I can't see how it's not used, "sum" is then assigned to nm.arena, which is returned
nm.arena = sum;
The code you reference is in dlmalloc_2_8_6.c
, not dlmalloc_ext_2_8_6.c
@igaztanaga clang-15 complains about the following unused variables: libs/container/src/dlmalloc_2_8_6.c:3991:7: warning: variable 'nfences' set but not used [-Wunused-but-set-variable] int nfences = 0; ^ In file included from libs/container/src/alloc_lib.c:24: libs/container/src/dlmalloc_ext_2_8_6.c:1227:14: warning: variable 'sum' set but not used [-Wunused-but-set-variable] size_t sum = mfree; ^ 2 warnings generated.
The function
boost_cont_allocated_memory()
initializes and periodically updates a local variablesum
, but never uses it for anything. This triggers warnings in some compilers and static analysis tools: