Re: Don't cast away const where possible
От
Bertrand Drouvot
Тема
Re: Don't cast away const where possible
Дата
Msg-id
aZw4fcj1qBYgN41V@ip-10-97-1-34.eu-west-3.compute.internal
Ответ на
Re: Don't cast away const where possible (Peter Eisentraut)
Список
Дерево обсуждения
Don't cast away const where possible Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Don't cast away const where possible Peter Eisentraut <peter@eisentraut.org>
Re: Don't cast away const where possible Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Don't cast away const where possible Chao Li <li.evan.chao@gmail.com>
Re: Don't cast away const where possible Peter Eisentraut <peter@eisentraut.org>
Re: Don't cast away const where possible Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Don't cast away const where possible Peter Eisentraut <peter@eisentraut.org>
Re: Don't cast away const where possible Peter Eisentraut <peter@eisentraut.org>
Re: Don't cast away const where possible Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Don't cast away const where possible Peter Eisentraut <peter@eisentraut.org>
Re: Don't cast away const where possible Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Re: Don't cast away const where possible Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Hi, On Mon, Feb 23, 2026 at 08:24:22AM +0100, Peter Eisentraut wrote: > I have another patch that removes some -Wcast-qual warnings, by adjusting > some function APIs. > > This is as far as I get without resorting to advanced tricks like > unconstify() or _Generic. Yeah, so the patch removes those: jsonapi.c:2170:53: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] jsonapi.c:2171:52: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] jsonapi.c:2172:54: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] jsonapi.c:2170:53: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] jsonapi.c:2171:52: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] jsonapi.c:2172:54: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] jsonapi.c:2170:53: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] jsonapi.c:2171:52: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] jsonapi.c:2172:54: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] ginbulk.c:247:62: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] ginbulk.c:247:79: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] parser.c:265:51: warning: cast discards ‘const’ qualifier from pointer target type [-Wcast-qual] and looks ok. 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). Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.com
В списке pgsql-hackers по дате отправления