Harmonize lexer adjacent function parameter names.
authorPeter Geoghegan <pg@bowt.ie>
Wed, 21 Sep 2022 20:21:36 +0000 (13:21 -0700)
committerPeter Geoghegan <pg@bowt.ie>
Wed, 21 Sep 2022 20:21:36 +0000 (13:21 -0700)
Make sure that function declarations use names that exactly match the
corresponding names from function definitions for several "lexer
adjacent" backend functions.

These functions were missed by recent commits because they were obscured
by clang-tidy warnings about functions whose signature is directly under
the control of the lexer (flex seems to always generate function
declarations with unnamed parameters).  We probably can't fix most of
the warnings it generates for translation units that get built from .l
and .y files, but we can at least do this much.

Author: Peter Geoghegan <pg@bowt.ie>
Discussion: https://postgr.es/m/CAH2-WznJt9CMM9KJTMjJh_zbL5hD9oX44qdJ4aqZtjFi-zA3Tg@mail.gmail.com

src/bin/pgbench/exprparse.y
src/include/replication/syncrep.h
src/include/replication/walsender_private.h

index f6387d4a3cbeb08639faf95ed89fdd942b03e423..17b065a6bff23bcabca84aef87d4ee4512f4af55 100644 (file)
@@ -23,7 +23,7 @@
 
 PgBenchExpr *expr_parse_result;
 
-static PgBenchExprList *make_elist(PgBenchExpr *exp, PgBenchExprList *list);
+static PgBenchExprList *make_elist(PgBenchExpr *expr, PgBenchExprList *list);
 static PgBenchExpr *make_null_constant(void);
 static PgBenchExpr *make_boolean_constant(bool bval);
 static PgBenchExpr *make_integer_constant(int64 ival);
index b5446597b506ed6669d0ebe52214a80ce5ddef0f..0f3b3a7955e81a4c8d4eb9aff13fba40fe5b4674 100644 (file)
@@ -103,7 +103,7 @@ extern void SyncRepUpdateSyncStandbysDefined(void);
 extern int     syncrep_yyparse(void);
 extern int     syncrep_yylex(void);
 extern void syncrep_yyerror(const char *str);
-extern void syncrep_scanner_init(const char *query_string);
+extern void syncrep_scanner_init(const char *str);
 extern void syncrep_scanner_finish(void);
 
 #endif                                                 /* _SYNCREP_H */
index 9c61f92c4461813623f2ba423fbe3587b8f5ec58..cb4da76a896b37c4bf8e3cfdbfd2f1b19449a39f 100644 (file)
@@ -119,7 +119,7 @@ extern void WalSndSetState(WalSndState state);
 extern int     replication_yyparse(void);
 extern int     replication_yylex(void);
 extern void replication_yyerror(const char *str) pg_attribute_noreturn();
-extern void replication_scanner_init(const char *query_string);
+extern void replication_scanner_init(const char *str);
 extern void replication_scanner_finish(void);
 extern bool replication_scanner_is_replication_command(void);