Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit 9dc76f0

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 010429e commit 9dc76f0

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/bin/pg_upgrade/pg_upgrade.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -446,7 +446,7 @@ bool check_for_data_types_usage(ClusterInfo *cluster,
446446
const char *base_query,
447447
const char *output_path);
448448
bool check_for_data_type_usage(ClusterInfo *cluster,
449-
const char *typename,
449+
const char *type_name,
450450
const char *output_path);
451451
void new_9_0_populate_pg_largeobject_metadata(ClusterInfo *cluster,
452452
bool check_mode);

src/bin/pg_upgrade/version.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -233,20 +233,20 @@ check_for_data_types_usage(ClusterInfo *cluster,
233233
*
234234
* If so, write a report to the given file name, and return true.
235235
*
236-
* typename should be a fully qualified type name. This is just a
236+
* type_name should be a fully qualified type name. This is just a
237237
* trivial wrapper around check_for_data_types_usage() to convert a
238238
* type name into a base query.
239239
*/
240240
bool
241241
check_for_data_type_usage(ClusterInfo *cluster,
242-
const char *typename,
242+
const char *type_name,
243243
const char *output_path)
244244
{
245245
bool found;
246246
char *base_query;
247247

248248
base_query = psprintf("SELECT '%s'::pg_catalog.regtype AS oid",
249-
typename);
249+
type_name);
250250

251251
found = check_for_data_types_usage(cluster, base_query, output_path);
252252

0 commit comments

Comments
 (0)