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

Commit d6f0f95

Browse files
Harmonize some more function parameter names.
Make sure that function declarations use names that exactly match the corresponding names from function definitions in a few places. These inconsistencies were all introduced relatively recently, after the code base had parameter name mismatches fixed in bulk (see commits starting with commits 4274dc2 and 035ce1f). pg_bsd_indent still has a couple of similar inconsistencies, which I (pgeoghegan) have left untouched for now. Like all earlier commits that cleaned up function parameter names, this commit was written with help from clang-tidy.
1 parent f7431bc commit d6f0f95

File tree

11 files changed

+17
-17
lines changed

11 files changed

+17
-17
lines changed

src/backend/parser/parse_expr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ static Node *transformJsonArrayQueryConstructor(ParseState *pstate,
8383
JsonArrayQueryConstructor *ctor);
8484
static Node *transformJsonObjectAgg(ParseState *pstate, JsonObjectAgg *agg);
8585
static Node *transformJsonArrayAgg(ParseState *pstate, JsonArrayAgg *agg);
86-
static Node *transformJsonIsPredicate(ParseState *pstate, JsonIsPredicate *p);
86+
static Node *transformJsonIsPredicate(ParseState *pstate, JsonIsPredicate *pred);
8787
static Node *make_row_comparison_op(ParseState *pstate, List *opname,
8888
List *largs, List *rargs, int location);
8989
static Node *make_row_distinct_op(ParseState *pstate, List *opname,

src/backend/storage/buffer/bufmgr.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5176,9 +5176,9 @@ TerminateBufferIO(BufferDesc *buf, bool clear_dirty, uint32 set_flag_bits)
51765176
* possible the error condition wasn't related to the I/O.
51775177
*/
51785178
void
5179-
AbortBufferIO(Buffer buf)
5179+
AbortBufferIO(Buffer buffer)
51805180
{
5181-
BufferDesc *buf_hdr = GetBufferDescriptor(buf - 1);
5181+
BufferDesc *buf_hdr = GetBufferDescriptor(buffer - 1);
51825182
uint32 buf_state;
51835183

51845184
buf_state = LockBufHdr(buf_hdr);

src/backend/utils/activity/pgstat_io.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ pgstat_prepare_io_time(void)
109109
* Like pgstat_count_io_op_n() except it also accumulates time.
110110
*/
111111
void
112-
pgstat_count_io_op_time(IOObject io_obj, IOContext io_context, IOOp io_op,
112+
pgstat_count_io_op_time(IOObject io_object, IOContext io_context, IOOp io_op,
113113
instr_time start_time, uint32 cnt)
114114
{
115115
if (track_io_timing)
@@ -122,21 +122,21 @@ pgstat_count_io_op_time(IOObject io_obj, IOContext io_context, IOOp io_op,
122122
if (io_op == IOOP_WRITE)
123123
{
124124
pgstat_count_buffer_write_time(INSTR_TIME_GET_MICROSEC(io_time));
125-
if (io_obj == IOOBJECT_RELATION)
125+
if (io_object == IOOBJECT_RELATION)
126126
INSTR_TIME_ADD(pgBufferUsage.blk_write_time, io_time);
127127
}
128128
else if (io_op == IOOP_READ)
129129
{
130130
pgstat_count_buffer_read_time(INSTR_TIME_GET_MICROSEC(io_time));
131-
if (io_obj == IOOBJECT_RELATION)
131+
if (io_object == IOOBJECT_RELATION)
132132
INSTR_TIME_ADD(pgBufferUsage.blk_read_time, io_time);
133133
}
134134

135-
INSTR_TIME_ADD(PendingIOStats.pending_times[io_obj][io_context][io_op],
135+
INSTR_TIME_ADD(PendingIOStats.pending_times[io_object][io_context][io_op],
136136
io_time);
137137
}
138138

139-
pgstat_count_io_op_n(io_obj, io_context, io_op, cnt);
139+
pgstat_count_io_op_n(io_object, io_context, io_op, cnt);
140140
}
141141

142142
PgStat_IO *

src/backend/utils/adt/pg_locale.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ static size_t uchar_length(UConverter *converter,
149149
const char *str, int32_t len);
150150
static int32_t uchar_convert(UConverter *converter,
151151
UChar *dest, int32_t destlen,
152-
const char *str, int32_t srclen);
152+
const char *src, int32_t srclen);
153153
static void icu_set_collation_attributes(UCollator *collator, const char *loc,
154154
UErrorCode *status);
155155
#endif

src/bin/pg_dump/pg_dump.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ static char *getFormattedOperatorName(const char *oproid);
290290
static char *convertTSFunction(Archive *fout, Oid funcOid);
291291
static const char *getFormattedTypeName(Archive *fout, Oid oid, OidOptions opts);
292292
static void getLOs(Archive *fout);
293-
static void dumpLO(Archive *fout, const LoInfo *binfo);
293+
static void dumpLO(Archive *fout, const LoInfo *loinfo);
294294
static int dumpLOs(Archive *fout, const void *arg);
295295
static void dumpPolicy(Archive *fout, const PolicyInfo *polinfo);
296296
static void dumpPublication(Archive *fout, const PublicationInfo *pubinfo);

src/include/pgstat.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -515,13 +515,13 @@ extern PgStat_CheckpointerStats *pgstat_fetch_stat_checkpointer(void);
515515
* Functions in pgstat_io.c
516516
*/
517517

518-
extern bool pgstat_bktype_io_stats_valid(PgStat_BktypeIO *context_ops,
518+
extern bool pgstat_bktype_io_stats_valid(PgStat_BktypeIO *backend_io,
519519
BackendType bktype);
520520
extern void pgstat_count_io_op(IOObject io_object, IOContext io_context, IOOp io_op);
521521
extern void pgstat_count_io_op_n(IOObject io_object, IOContext io_context, IOOp io_op, uint32 cnt);
522522
extern instr_time pgstat_prepare_io_time(void);
523523
extern void pgstat_count_io_op_time(IOObject io_object, IOContext io_context,
524-
IOOp io_op, instr_time time, uint32 cnt);
524+
IOOp io_op, instr_time start_time, uint32 cnt);
525525

526526
extern PgStat_IO *pgstat_fetch_stat_io(void);
527527
extern const char *pgstat_get_io_context_name(IOContext io_context);

src/include/replication/worker_internal.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,7 @@ extern void pa_switch_to_partial_serialize(ParallelApplyWorkerInfo *winfo,
282282
bool stream_locked);
283283

284284
extern void pa_set_xact_state(ParallelApplyWorkerShared *wshared,
285-
ParallelTransState in_xact);
285+
ParallelTransState xact_state);
286286
extern void pa_set_stream_apply_worker(ParallelApplyWorkerInfo *winfo);
287287

288288
extern void pa_start_subtrans(TransactionId current_xid,

src/include/storage/buf_internals.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -392,7 +392,7 @@ extern void IssuePendingWritebacks(WritebackContext *context);
392392
extern void ScheduleBufferTagForWriteback(WritebackContext *context, BufferTag *tag);
393393

394394
/* freelist.c */
395-
extern IOContext IOContextForStrategy(BufferAccessStrategy bas);
395+
extern IOContext IOContextForStrategy(BufferAccessStrategy strategy);
396396
extern BufferDesc *StrategyGetBuffer(BufferAccessStrategy strategy,
397397
uint32 *buf_state, bool *from_ring);
398398
extern void StrategyFreeBuffer(BufferDesc *buf);

src/pl/plpython/plpy_resultobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ static Py_ssize_t PLy_result_length(PyObject *arg);
2020
static PyObject *PLy_result_item(PyObject *arg, Py_ssize_t idx);
2121
static PyObject *PLy_result_str(PyObject *arg);
2222
static PyObject *PLy_result_subscript(PyObject *arg, PyObject *item);
23-
static int PLy_result_ass_subscript(PyObject *self, PyObject *item, PyObject *value);
23+
static int PLy_result_ass_subscript(PyObject *arg, PyObject *item, PyObject *value);
2424

2525
static char PLy_result_doc[] = "Results of a PostgreSQL query";
2626

src/test/modules/test_shm_mq/test_shm_mq.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ typedef struct
3636

3737
/* Set up dynamic shared memory and background workers for test run. */
3838
extern void test_shm_mq_setup(int64 queue_size, int32 nworkers,
39-
dsm_segment **seg, shm_mq_handle **output,
39+
dsm_segment **segp, shm_mq_handle **output,
4040
shm_mq_handle **input);
4141

4242
/* Main entrypoint for a worker. */

src/test/modules/worker_spi/worker_spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ PG_MODULE_MAGIC;
4646

4747
PG_FUNCTION_INFO_V1(worker_spi_launch);
4848

49-
PGDLLEXPORT void worker_spi_main(Datum) pg_attribute_noreturn();
49+
PGDLLEXPORT void worker_spi_main(Datum main_arg) pg_attribute_noreturn();
5050

5151
/* GUC variables */
5252
static int worker_spi_naptime = 10;

0 commit comments

Comments
 (0)