From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Fix casting away of volatile qualifier
Date: Mon, 19 Oct 2026 07:06:57 +0000
Message-ID: <E1xIhST-00000002EFd-1nEH@gemulon.postgresql.org> (raw)
Fix casting away of volatile qualifier
Fix some issues involving volatile that would be triggered by
-Wcast-qual.
For PMSignalState, move the volatile qualifiers to the PMSignalData
fields that need it rather than making the whole structure have it.
For the MemSet() calls, do the initialization honestly with a loop
instead.
Note that the MemSet() calls would be normal "discards qualifier"
warnings if memset() (or another function with a prototype, not a
macro) were used.
Reviewed-by: Rui Zhao <zhaorui126@gmail.com>
Reviewed-by: Andres Freund <andres@anarazel.de> (older version)
Discussion: https://www.postgresql.org/message-id/c76b72dd-5736-453a-b698-6968d42e4768%40eisentraut.org
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/22ff4fc5a21bce3ccf0376e0e91fde8fd2f28655
Modified Files
--------------
src/backend/postmaster/launch_backend.c | 2 +-
src/backend/storage/ipc/pmsignal.c | 8 ++++----
src/backend/storage/ipc/procsignal.c | 6 ++++--
src/backend/utils/activity/backend_progress.c | 3 ++-
src/include/storage/pmsignal.h | 2 +-
5 files changed, 12 insertions(+), 9 deletions(-)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-committers@postgresql.org
Cc: peter@eisentraut.org
Subject: Re: pgsql: Fix casting away of volatile qualifier
In-Reply-To: <E1xIhST-00000002EFd-1nEH@gemulon.postgresql.org>
References: <E1xIhST-00000002EFd-1nEH@gemulon.postgresql.org>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox