Skip to content

Commit 85c8094

Browse files
committed
Clean up cpluspluscheck violation.
"typename" is a C++ keyword, so pg_upgrade.h fails to compile in C++. Fortunately, there seems no likely reason for somebody to need to do that. Nonetheless, it's project policy that all .h files should pass cpluspluscheck, so rename the argument to fix that. Oversight in 57c081d; back-patch as that was. (The policy requiring pg_upgrade.h to pass cpluspluscheck only goes back to v12, but it seems best to keep this code looking the same in all branches.)
1 parent 943bda1 commit 85c8094

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/bin/pg_upgrade/pg_upgrade.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,7 @@ bool check_for_data_types_usage(ClusterInfo *cluster,
445445
const char *base_query,
446446
const char *output_path);
447447
bool check_for_data_type_usage(ClusterInfo *cluster,
448-
const char *typename,
448+
const char *type_name,
449449
const char *output_path);
450450
void new_9_0_populate_pg_largeobject_metadata(ClusterInfo *cluster,
451451
bool check_mode);

src/bin/pg_upgrade/version.c

+3-3
Original file line numberDiff line numberDiff line change
@@ -236,20 +236,20 @@ check_for_data_types_usage(ClusterInfo *cluster,
236236
*
237237
* If so, write a report to the given file name, and return true.
238238
*
239-
* typename should be a fully qualified type name. This is just a
239+
* type_name should be a fully qualified type name. This is just a
240240
* trivial wrapper around check_for_data_types_usage() to convert a
241241
* type name into a base query.
242242
*/
243243
bool
244244
check_for_data_type_usage(ClusterInfo *cluster,
245-
const char *typename,
245+
const char *type_name,
246246
const char *output_path)
247247
{
248248
bool found;
249249
char *base_query;
250250

251251
base_query = psprintf("SELECT '%s'::pg_catalog.regtype AS oid",
252-
typename);
252+
type_name);
253253

254254
found = check_for_data_types_usage(cluster, base_query, output_path);
255255

0 commit comments

Comments
 (0)