Some compiling warnings
Some compiling warnings
When trying Valgrind I came across some compiling warnings with
USE_VALGRIND defined and --enable-cassert not configured. This is
mainly because in this case we have MEMORY_CONTEXT_CHECKING defined
while USE_ASSERT_CHECKING not defined.
aset.c: In function ‘AllocSetFree’:
aset.c:1027:10: warning: unused variable ‘chunk_size’ [-Wunused-variable]
Size chunk_size = block->endptr - (char *) pointer;
^
generation.c: In function ‘GenerationFree’:
generation.c:633:8: warning: variable ‘chunksize’ set but not used [-Wunused-but-set-variable]
Size chunksize;
^
Attach a trivial patch for the fix.
Thanks
Richard
USE_VALGRIND defined and --enable-cassert not configured. This is
mainly because in this case we have MEMORY_CONTEXT_CHECKING defined
while USE_ASSERT_CHECKING not defined.
aset.c: In function ‘AllocSetFree’:
aset.c:1027:10: warning: unused variable ‘chunk_size’ [-Wunused-variable]
Size chunk_size = block->endptr - (char *) pointer;
^
generation.c: In function ‘GenerationFree’:
generation.c:633:8: warning: variable ‘chunksize’ set but not used [-Wunused-but-set-variable]
Size chunksize;
^
Attach a trivial patch for the fix.
Thanks
Richard
Re: Some compiling warnings
От:
David Rowley <dgrowleyml@gmail.com>
Дата:
On Wed, 4 Jan 2023 at 20:11, Richard Guo wrote: > > When trying Valgrind I came across some compiling warnings with > USE_VALGRIND defined and --enable-cassert not configured. This is > mainly because in this case we have MEMORY_CONTEXT_CHECKING defined > while USE_ASSERT_CHECKING not defined. > Attach a trivial patch for the fix. I've just pushed that. Thanks. David