Re: Fix accidentally cast away qualifiers - Mailing list pgsql-hackers

From Chao Li
Subject Re: Fix accidentally cast away qualifiers
Date
Msg-id 16F3FF82-6215-4318-9930-842926B3C693@gmail.com
Whole thread Raw
In response to Fix accidentally cast away qualifiers  (Peter Eisentraut <peter@eisentraut.org>)
List pgsql-hackers

> On Jan 20, 2026, at 15:54, Peter Eisentraut <peter@eisentraut.org> wrote:
>
> This patch fixes cases where a qualifier (const, in all cases here) was dropped by a cast, but the cast was otherwise
necessaryor desirable, so the straightforward fix is to add the qualifier into the cast. 
>
> This was checked with gcc -Wcast-qual, but it doesn't fix all such warnings, only the trivially fixable
ones.<0001-Fix-accidentally-cast-away-qualifiers.patch>

Looks good to me. All changes are const-correctness fixes without semantic changes.

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Fix accidentally cast away qualifiers
Next
From: Daniil Davydov
Date:
Subject: Re: Fix comments for buf_id field of BufferDesc structure