Skip to content

Commit 979cd65

Browse files
committed
Suppress compiler warning in pub_collist_to_bitmapset().
A fair percentage of the buildfarm doesn't recognize that oldcxt won't be used uninitialized; silence those warnings by initializing it. While here, upgrade the function's thoroughly inadequate header comment. Oversight in 923def9, per buildfarm.
1 parent 923def9 commit 979cd65

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

src/backend/catalog/pg_publication.c

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -592,7 +592,11 @@ publication_translate_columns(Relation targetrel, List *columns,
592592
}
593593

594594
/*
595-
* Transform the column list (represented by an array) to a bitmapset.
595+
* Transform a column list (represented by an array Datum) to a bitmapset.
596+
*
597+
* If columns isn't NULL, add the column numbers to that set.
598+
*
599+
* If mcxt isn't NULL, build the bitmapset in that context.
596600
*/
597601
Bitmapset *
598602
pub_collist_to_bitmapset(Bitmapset *columns, Datum pubcols, MemoryContext mcxt)
@@ -601,7 +605,7 @@ pub_collist_to_bitmapset(Bitmapset *columns, Datum pubcols, MemoryContext mcxt)
601605
ArrayType *arr;
602606
int nelems;
603607
int16 *elems;
604-
MemoryContext oldcxt;
608+
MemoryContext oldcxt = NULL;
605609

606610
/*
607611
* If an existing bitmap was provided, use it. Otherwise just use NULL

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy