agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
pgsql: Fix another case of indirectly casting away const.
7+ messages / 1 participants
[nested] [flat]

* pgsql: Fix another case of indirectly casting away const.
@ 2025-12-24 02:39 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2025-12-24 02:39 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix another case of indirectly casting away const.

This one was missed in 8f1791c61, because the machines that
detected those issues don't compile this function.

Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/1324889.1764886170@sss.pgh.pa.us

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9f7565c6c2d45df9705556c60f41394a8356cdf9

Modified Files
--------------
src/port/getopt.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix another case of indirectly casting away const.
@ 2026-06-04 15:38 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2026-06-04 15:38 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix another case of indirectly casting away const.

Like 8f1791c61, this fixes a case of implicitly casting away
const by not treating the result of strrchr() on a const pointer
as const.  This was missed at the time because the machines
reporting those warnings weren't building with --with-llvm.

While here, clean up another infelicity: in the probably-
impossible case that the input string contains only one dot,
this function would call pnstrdup() with a length of -1
and thereby emit a module name equal to the function name.
It seems to me we should emit modname = NULL instead.

Also remove a useless Assert and two redundant assignments.

Back-patch, as 8f1791c61 was, so that users of back branches
don't see this warning when building with late-model gcc.

Reported-by: hubert depesz lubaczewski <depesz@depesz.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/aiGNJ89PBqvq2Yyz@depesz.com
Backpatch-through: 14

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/c35f85ac02a1c19dbb40382a8098846ffc3b368b

Modified Files
--------------
src/backend/jit/llvm/llvmjit.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix another case of indirectly casting away const.
@ 2026-06-04 15:38 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2026-06-04 15:38 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix another case of indirectly casting away const.

Like 8f1791c61, this fixes a case of implicitly casting away
const by not treating the result of strrchr() on a const pointer
as const.  This was missed at the time because the machines
reporting those warnings weren't building with --with-llvm.

While here, clean up another infelicity: in the probably-
impossible case that the input string contains only one dot,
this function would call pnstrdup() with a length of -1
and thereby emit a module name equal to the function name.
It seems to me we should emit modname = NULL instead.

Also remove a useless Assert and two redundant assignments.

Back-patch, as 8f1791c61 was, so that users of back branches
don't see this warning when building with late-model gcc.

Reported-by: hubert depesz lubaczewski <depesz@depesz.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/aiGNJ89PBqvq2Yyz@depesz.com
Backpatch-through: 14

Branch
------
REL_18_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0228d098ac48b6f82781c0382fe875d559f1042a

Modified Files
--------------
src/backend/jit/llvm/llvmjit.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix another case of indirectly casting away const.
@ 2026-06-04 15:38 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2026-06-04 15:38 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix another case of indirectly casting away const.

Like 8f1791c61, this fixes a case of implicitly casting away
const by not treating the result of strrchr() on a const pointer
as const.  This was missed at the time because the machines
reporting those warnings weren't building with --with-llvm.

While here, clean up another infelicity: in the probably-
impossible case that the input string contains only one dot,
this function would call pnstrdup() with a length of -1
and thereby emit a module name equal to the function name.
It seems to me we should emit modname = NULL instead.

Also remove a useless Assert and two redundant assignments.

Back-patch, as 8f1791c61 was, so that users of back branches
don't see this warning when building with late-model gcc.

Reported-by: hubert depesz lubaczewski <depesz@depesz.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/aiGNJ89PBqvq2Yyz@depesz.com
Backpatch-through: 14

Branch
------
REL_17_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/cefe7576404f5c96f25d4f683ffab72634c421fa

Modified Files
--------------
src/backend/jit/llvm/llvmjit.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix another case of indirectly casting away const.
@ 2026-06-04 15:38 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2026-06-04 15:38 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix another case of indirectly casting away const.

Like 8f1791c61, this fixes a case of implicitly casting away
const by not treating the result of strrchr() on a const pointer
as const.  This was missed at the time because the machines
reporting those warnings weren't building with --with-llvm.

While here, clean up another infelicity: in the probably-
impossible case that the input string contains only one dot,
this function would call pnstrdup() with a length of -1
and thereby emit a module name equal to the function name.
It seems to me we should emit modname = NULL instead.

Also remove a useless Assert and two redundant assignments.

Back-patch, as 8f1791c61 was, so that users of back branches
don't see this warning when building with late-model gcc.

Reported-by: hubert depesz lubaczewski <depesz@depesz.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/aiGNJ89PBqvq2Yyz@depesz.com
Backpatch-through: 14

Branch
------
REL_16_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/92f26d582632da349a565d340b3c8b8cb6b722be

Modified Files
--------------
src/backend/jit/llvm/llvmjit.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix another case of indirectly casting away const.
@ 2026-06-04 15:38 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2026-06-04 15:38 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix another case of indirectly casting away const.

Like 8f1791c61, this fixes a case of implicitly casting away
const by not treating the result of strrchr() on a const pointer
as const.  This was missed at the time because the machines
reporting those warnings weren't building with --with-llvm.

While here, clean up another infelicity: in the probably-
impossible case that the input string contains only one dot,
this function would call pnstrdup() with a length of -1
and thereby emit a module name equal to the function name.
It seems to me we should emit modname = NULL instead.

Also remove a useless Assert and two redundant assignments.

Back-patch, as 8f1791c61 was, so that users of back branches
don't see this warning when building with late-model gcc.

Reported-by: hubert depesz lubaczewski <depesz@depesz.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/aiGNJ89PBqvq2Yyz@depesz.com
Backpatch-through: 14

Branch
------
REL_15_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/96d68502801dcfe7165e3a586bed20979dda51e5

Modified Files
--------------
src/backend/jit/llvm/llvmjit.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix another case of indirectly casting away const.
@ 2026-06-04 15:38 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 7+ messages in thread

From: Tom Lane @ 2026-06-04 15:38 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix another case of indirectly casting away const.

Like 8f1791c61, this fixes a case of implicitly casting away
const by not treating the result of strrchr() on a const pointer
as const.  This was missed at the time because the machines
reporting those warnings weren't building with --with-llvm.

While here, clean up another infelicity: in the probably-
impossible case that the input string contains only one dot,
this function would call pnstrdup() with a length of -1
and thereby emit a module name equal to the function name.
It seems to me we should emit modname = NULL instead.

Also remove a useless Assert and two redundant assignments.

Back-patch, as 8f1791c61 was, so that users of back branches
don't see this warning when building with late-model gcc.

Reported-by: hubert depesz lubaczewski <depesz@depesz.com>
Author: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/aiGNJ89PBqvq2Yyz@depesz.com
Backpatch-through: 14

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7bdff3e890e3d1149e9753b61667ccd14f15e6f4

Modified Files
--------------
src/backend/jit/llvm/llvmjit.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2026-06-04 15:38 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-12-24 02:39 pgsql: Fix another case of indirectly casting away const. Tom Lane <tgl@sss.pgh.pa.us>
2026-06-04 15:38 pgsql: Fix another case of indirectly casting away const. Tom Lane <tgl@sss.pgh.pa.us>
2026-06-04 15:38 pgsql: Fix another case of indirectly casting away const. Tom Lane <tgl@sss.pgh.pa.us>
2026-06-04 15:38 pgsql: Fix another case of indirectly casting away const. Tom Lane <tgl@sss.pgh.pa.us>
2026-06-04 15:38 pgsql: Fix another case of indirectly casting away const. Tom Lane <tgl@sss.pgh.pa.us>
2026-06-04 15:38 pgsql: Fix another case of indirectly casting away const. Tom Lane <tgl@sss.pgh.pa.us>
2026-06-04 15:38 pgsql: Fix another case of indirectly casting away const. Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox