pgsql: Silence compiler warnings on clang 21

From: Peter Eisentraut <peter(at)eisentraut(dot)org>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Silence compiler warnings on clang 21
Date: 2025-09-12 05:35:36
Message-ID: E1uwwRb-000IHM-2O@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Silence compiler warnings on clang 21

Clang 21 shows some new compiler warnings, for example:

warning: variable 'dstsize' is uninitialized when passed as a const pointer argument here [-Wuninitialized-const-pointer]

The fix is to initialize the variables when they are defined. This is
similar to, for example, the existing situation in gistKeyIsEQ().

Discussion: https://www.postgresql.org/message-id/flat/6604ad6e-5934-43ac-8590-15113d6ae4b1%40eisentraut.org

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/a399db8d5988902da3f7bf55b78fd3511020fc66

Modified Files
--------------
src/backend/access/common/toast_internals.c | 2 +-
src/backend/access/gist/gistutil.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Peter Eisentraut 2025-09-12 05:45:33 pgsql: Remove traces of support for Sun Studio compiler
Previous Message Richard Guo 2025-09-12 02:13:09 pgsql: Fix misuse of Relids for storing attribute numbers