Some compiling warnings

From: Richard Guo <guofenglinux(at)gmail(dot)com>
To: PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Some compiling warnings
Date: 2023-01-04 07:11:02
Message-ID: CAMbWs4_D-vgLEh7eO47p=73u1jWO78NWf6Qfv1FndY1kG-Q-jA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

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

Attachment Content-Type Size
v1-0001-Fix-some-compiling-warnings.patch application/octet-stream 2.3 KB

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Ankit Kumar Pandey 2023-01-04 08:21:56 Re: [PATCH] Improve ability to display optimizer analysis using OPTIMIZER_DEBUG
Previous Message Corey Huinker 2023-01-04 07:09:23 Re: Add SHELL_EXIT_CODE to psql