On Tue, Dec 16, 2025 at 7:18 AM Peter Eisentraut <[email protected]> wrote: > > You are not modifying deadoffsets in prune_freeze_setup(), but you are > assigning its address to a pointer variable that is not const-qualified, > and so it could be used to modify it later on. > > A caller to prune_freeze_setup() that sees the signature const > PruneFreezeResult *presult could pass a pointer to a PruneFreezeResult > object that is notionally in read-only memory. But through the > non-const-qualified pointer you could later modify the pointed-to > memory, which would be invalid. The point of propagating the qualifiers > is to prevent that at compile time.
Thanks for the explanation. I've committed your proposed fix. - Melanie
