🌐 AI搜索 & 代理 主页
Skip to content

Commit 9b05e2e

Browse files
Use "foo(void)" for definitions of functions with no parameters.
Standard practice in PostgreSQL is to use "foo(void)" instead of "foo()", as the latter looks like an "old-style" function declaration. Similar changes were made in commits cdf4b9a, 0e72b9d, 7069dbc, f1283ed, 7b66e2c, e95126c, and 9f7c527. Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com> Reviewed-by: Matthias van de Meent <boekewurm+postgres@gmail.com> Discussion: https://postgr.es/m/aTBObQPg%2Bps5I7vl%40ip-10-97-1-34.eu-west-3.compute.internal
1 parent be25c77 commit 9b05e2e

File tree

9 files changed

+11
-11
lines changed

9 files changed

+11
-11
lines changed

src/backend/access/common/heaptuple.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ missing_match(const void *key1, const void *key2, Size keysize)
123123
}
124124

125125
static void
126-
init_missing_cache()
126+
init_missing_cache(void)
127127
{
128128
HASHCTL hash_ctl;
129129

src/backend/access/index/genam.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -488,7 +488,7 @@ systable_beginscan(Relation heapRelation,
488488
* is declared.
489489
*/
490490
static inline void
491-
HandleConcurrentAbort()
491+
HandleConcurrentAbort(void)
492492
{
493493
if (TransactionIdIsValid(CheckXidAlive) &&
494494
!TransactionIdIsInProgress(CheckXidAlive) &&

src/backend/replication/logical/applyparallelworker.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ pa_detach_all_error_mq(void)
640640
* Check if there are any pending spooled messages.
641641
*/
642642
static bool
643-
pa_has_spooled_message_pending()
643+
pa_has_spooled_message_pending(void)
644644
{
645645
PartialFileSetState fileset_state;
646646

src/backend/replication/logical/sequencesync.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -711,7 +711,7 @@ LogicalRepSyncSequences(void)
711711
* resource error and are not repeatable.
712712
*/
713713
static void
714-
start_sequence_sync()
714+
start_sequence_sync(void)
715715
{
716716
Assert(am_sequencesync_worker());
717717

src/backend/replication/logical/slotsync.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1410,7 +1410,7 @@ check_and_set_sync_info(pid_t worker_pid)
14101410
* Reset syncing flag.
14111411
*/
14121412
static void
1413-
reset_syncing_flag()
1413+
reset_syncing_flag(void)
14141414
{
14151415
SpinLockAcquire(&SlotSyncCtx->mutex);
14161416
SlotSyncCtx->syncing = false;

src/backend/replication/logical/tablesync.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1551,7 +1551,7 @@ start_table_sync(XLogRecPtr *origin_startpos, char **slotname)
15511551
* and starts streaming to catchup with apply worker.
15521552
*/
15531553
static void
1554-
run_tablesync_worker()
1554+
run_tablesync_worker(void)
15551555
{
15561556
char originname[NAMEDATALEN];
15571557
XLogRecPtr origin_startpos = InvalidXLogRecPtr;

src/backend/replication/logical/worker.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5561,7 +5561,7 @@ set_stream_options(WalRcvStreamOptions *options,
55615561
* Cleanup the memory for subxacts and reset the related variables.
55625562
*/
55635563
static inline void
5564-
cleanup_subxact_info()
5564+
cleanup_subxact_info(void)
55655565
{
55665566
if (subxact_data.subxacts)
55675567
pfree(subxact_data.subxacts);
@@ -5621,7 +5621,7 @@ start_apply(XLogRecPtr origin_startpos)
56215621
* It sets up replication origin, streaming options and then starts streaming.
56225622
*/
56235623
static void
5624-
run_apply_worker()
5624+
run_apply_worker(void)
56255625
{
56265626
char originname[NAMEDATALEN];
56275627
XLogRecPtr origin_startpos = InvalidXLogRecPtr;

src/backend/utils/adt/uuid.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ static int uuid_fast_cmp(Datum x, Datum y, SortSupport ssup);
7171
static bool uuid_abbrev_abort(int memtupcount, SortSupport ssup);
7272
static Datum uuid_abbrev_convert(Datum original, SortSupport ssup);
7373
static inline void uuid_set_version(pg_uuid_t *uuid, unsigned char version);
74-
static inline int64 get_real_time_ns_ascending();
74+
static inline int64 get_real_time_ns_ascending(void);
7575
static pg_uuid_t *generate_uuidv7(uint64 unix_ts_ms, uint32 sub_ms);
7676

7777
Datum
@@ -545,7 +545,7 @@ gen_random_uuid(PG_FUNCTION_ARGS)
545545
* than the previous returned timestamp (on this backend).
546546
*/
547547
static inline int64
548-
get_real_time_ns_ascending()
548+
get_real_time_ns_ascending(void)
549549
{
550550
static int64 previous_ns = 0;
551551
int64 ns;

src/bin/pg_basebackup/pg_createsubscriber.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ struct LogicalRepInfos
7878
};
7979

8080
static void cleanup_objects_atexit(void);
81-
static void usage();
81+
static void usage(void);
8282
static char *get_base_conninfo(const char *conninfo, char **dbname);
8383
static char *get_sub_conninfo(const struct CreateSubscriberOptions *opt);
8484
static char *get_exec_path(const char *argv0, const char *progname);

0 commit comments

Comments
 (0)