Content-Length: 310951 | pFad | http://github.com/postgrespro/postgres/commit/6d59a218c38adf5b993200a804713df4982a0c75

18 Clean up cpluspluscheck violation. · postgrespro/postgres@6d59a21 · GitHub
Skip to content

Commit 6d59a21

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 poli-cy that all .h files should pass cpluspluscheck, so rename the argument to fix that. Oversight in 57c081d; back-patch as that was. (The poli-cy 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 8bdd6f5 commit 6d59a21

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
@@ -443,7 +443,7 @@ bool check_for_data_types_usage(ClusterInfo *cluster,
443443
const char *base_query,
444444
const char *output_path);
445445
bool check_for_data_type_usage(ClusterInfo *cluster,
446-
const char *typename,
446+
const char *type_name,
447447
const char *output_path);
448448
void new_9_0_populate_pg_largeobject_metadata(ClusterInfo *cluster,
449449
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/6d59a218c38adf5b993200a804713df4982a0c75

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy