mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-21 13:34:40 +03:00
debug: avoid warning when compiled with valgrind
Declare 'c' only when compiling without valgrind. This cleans compiler warning about unused var when compiled with valgrind pool support.
This commit is contained in:
parent
356fdda46d
commit
5076456a73
@ -205,7 +205,6 @@ int dm_dump_memory_debug(void)
|
||||
unsigned long tot = 0;
|
||||
struct memblock *mb;
|
||||
char str[32];
|
||||
size_t c;
|
||||
|
||||
if (_head)
|
||||
log_very_verbose("You have a memory leak:");
|
||||
@ -218,6 +217,8 @@ int dm_dump_memory_debug(void)
|
||||
*/
|
||||
str[0] = '\0';
|
||||
#else
|
||||
size_t c;
|
||||
|
||||
for (c = 0; c < sizeof(str) - 1; c++) {
|
||||
if (c >= mb->length)
|
||||
str[c] = ' ';
|
||||
|
Loading…
Reference in New Issue
Block a user