Re: Mark function arguments of type "T *" as "const T *" where possible

From: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Re: Mark function arguments of type "T *" as "const T *" where possible
Date: 2025-12-10 06:39:40
Message-ID: aTkVrAWjbNsy6Hbi@ip-10-97-1-34.eu-west-3.compute.internal
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

On Tue, Dec 09, 2025 at 04:20:57PM +0000, Bertrand Drouvot wrote:
> To avoid any risks:
>
> - cases that produce -Wdiscarded-qualifiers warnings have been discarded as
> they would need more investigation.
>
> - double pointers are excluded to keep the changes straightforward.
>
> - cases that produce new -Wcast-qual warnings have been discarded.

Despite the above precautions, I just realized there are still "unwanted" const
additions (more on that later). I'll fix those and submit a new patch version.

Regards,

--
Bertrand Drouvot
PostgreSQL Contributors Team
RDS Open Source Databases
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Nazir Bilal Yavuz 2025-12-10 07:38:05 Re: [PATCH] test_aio: Skip io_uring tests when kernel disables it
Previous Message Steve Chavez 2025-12-10 06:10:28 Re: [PATCH] Add hint for misspelled relations