Re: Don't cast away const where possible - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: Don't cast away const where possible
Date
Msg-id 289cbc3c-5962-4d7a-b3e0-f7d4aef2639e@eisentraut.org
Whole thread Raw
In response to Re: Don't cast away const where possible  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Responses Re: Don't cast away const where possible
List pgsql-hackers
On 23.02.26 12:22, Bertrand Drouvot wrote:
> I can see a "volatile" one though:
> 
> vacuum.c:1885:46: warning: cast discards ‘volatile’ qualifier from pointer target type [-Wcast-qual]
> 
> worth to "fix" like in the attached while at it? (It's not really a fix as it
> moves the warning from vacuum.c to c.h, but that's consistent with 481018f2804).

That fix looks correct.  But my patch says it's making changes only 
without use unconstify and the like.  To fix all -Wcast-qual warnings, 
you'd need more changes like that, which I'm not currently proposing.




pgsql-hackers by date:

Previous
From: Peter Eisentraut
Date:
Subject: Re: Check for memset_explicit() and explicit_memset()
Next
From: Álvaro Herrera
Date:
Subject: Re: Fix bug of clearing of waitStart in ProcWakeup()