Avoid compiler warning in non-assert builds
authorAmit Langote <amitlan@postgresql.org>
Thu, 26 Oct 2023 08:12:24 +0000 (17:12 +0900)
committerAmit Langote <amitlan@postgresql.org>
Thu, 26 Oct 2023 08:32:38 +0000 (17:32 +0900)
commit1f06b7fc6e2bc505bea046ca54a4555ca835d7c9
tree8f0e59423ac3e4ed81c73000ae0c950ac408574e
parent611806cd726fc92989ac918eac48fd8d684869c7
Avoid compiler warning in non-assert builds

After 01575ad788e3, expand_single_inheritance_child()'s parentOID
variable is read only in an Assert, provoking a compiler warning in
non-assert builds.  Fix that by marking the variable with
PG_USED_FOR_ASSERTS_ONLY.

Per report and suggestion from David Rowley

Discussion: https://postgr.es/m/CAApHDvpjA_8Wxu4DCTRVAvPxC9atwMe6N%2ByvrcGsgb7mrfdpJA%40mail.gmail.com
src/backend/optimizer/util/inherit.c