mirror of
https://github.com/postgres/postgres.git
synced 2025-04-21 12:05:57 +03:00
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
This commit is contained in:
parent
611806cd72
commit
1f06b7fc6e
@ -457,7 +457,8 @@ expand_single_inheritance_child(PlannerInfo *root, RangeTblEntry *parentrte,
|
|||||||
Index *childRTindex_p)
|
Index *childRTindex_p)
|
||||||
{
|
{
|
||||||
Query *parse = root->parse;
|
Query *parse = root->parse;
|
||||||
Oid parentOID = RelationGetRelid(parentrel);
|
Oid parentOID PG_USED_FOR_ASSERTS_ONLY =
|
||||||
|
RelationGetRelid(parentrel);
|
||||||
Oid childOID = RelationGetRelid(childrel);
|
Oid childOID = RelationGetRelid(childrel);
|
||||||
RangeTblEntry *childrte;
|
RangeTblEntry *childrte;
|
||||||
Index childRTindex;
|
Index childRTindex;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user