public inbox for [email protected]help / color / mirror / Atom feed
pgsql: Fix another case of indirectly casting away const. 6+ messages / 1 participants [nested] [flat]
* pgsql: Fix another case of indirectly casting away const. @ 2026-06-04 15:38 Tom Lane <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2026-06-04 15:38 UTC (permalink / raw) To: [email protected] 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 <[email protected]> Author: Tom Lane <[email protected]> Discussion: https://postgr.es/m/[email protected] 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] 6+ messages in thread
* pgsql: Fix another case of indirectly casting away const. @ 2026-06-04 15:38 Tom Lane <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2026-06-04 15:38 UTC (permalink / raw) To: [email protected] 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 <[email protected]> Author: Tom Lane <[email protected]> Discussion: https://postgr.es/m/[email protected] 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] 6+ messages in thread
* pgsql: Fix another case of indirectly casting away const. @ 2026-06-04 15:38 Tom Lane <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2026-06-04 15:38 UTC (permalink / raw) To: [email protected] 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 <[email protected]> Author: Tom Lane <[email protected]> Discussion: https://postgr.es/m/[email protected] 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] 6+ messages in thread
* pgsql: Fix another case of indirectly casting away const. @ 2026-06-04 15:38 Tom Lane <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2026-06-04 15:38 UTC (permalink / raw) To: [email protected] 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 <[email protected]> Author: Tom Lane <[email protected]> Discussion: https://postgr.es/m/[email protected] 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] 6+ messages in thread
* pgsql: Fix another case of indirectly casting away const. @ 2026-06-04 15:38 Tom Lane <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2026-06-04 15:38 UTC (permalink / raw) To: [email protected] 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 <[email protected]> Author: Tom Lane <[email protected]> Discussion: https://postgr.es/m/[email protected] 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] 6+ messages in thread
* pgsql: Fix another case of indirectly casting away const. @ 2026-06-04 15:38 Tom Lane <[email protected]> 0 siblings, 0 replies; 6+ messages in thread From: Tom Lane @ 2026-06-04 15:38 UTC (permalink / raw) To: [email protected] 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 <[email protected]> Author: Tom Lane <[email protected]> Discussion: https://postgr.es/m/[email protected] 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] 6+ messages in thread
end of thread, other threads:[~2026-06-04 15:38 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-06-04 15:38 pgsql: Fix another case of indirectly casting away const. Tom Lane <[email protected]> 2026-06-04 15:38 pgsql: Fix another case of indirectly casting away const. Tom Lane <[email protected]> 2026-06-04 15:38 pgsql: Fix another case of indirectly casting away const. Tom Lane <[email protected]> 2026-06-04 15:38 pgsql: Fix another case of indirectly casting away const. Tom Lane <[email protected]> 2026-06-04 15:38 pgsql: Fix another case of indirectly casting away const. Tom Lane <[email protected]> 2026-06-04 15:38 pgsql: Fix another case of indirectly casting away const. Tom Lane <[email protected]>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox