Re: Use pg_icu_unicode_version(void) instead of pg_icu_unicode_version() - Mailing list pgsql-hackers

From Chao Li
Subject Re: Use pg_icu_unicode_version(void) instead of pg_icu_unicode_version()
Date
Msg-id 2E8E63C9-A2F6-4723-A937-B9F6CB34C88A@gmail.com
Whole thread Raw
In response to Use pg_icu_unicode_version(void) instead of pg_icu_unicode_version()  (Bertrand Drouvot <bertranddrouvot.pg@gmail.com>)
Responses Re: Use pg_icu_unicode_version(void) instead of pg_icu_unicode_version()
Re: Use pg_icu_unicode_version(void) instead of pg_icu_unicode_version()
List pgsql-hackers

> On Feb 27, 2026, at 12:46, Bertrand Drouvot <bertranddrouvot.pg@gmail.com> wrote:
>
> Hi hackers,
>
> Standard practice in PostgreSQL is to use "foo(void)" instead of "foo()", as the
> latter looks like an "old-style" function declaration. 9b05e2ec08a did fix
> all the ones reported by -Wstrict-prototypes.
>
> af2d4ca191a4 introduced a new one, this patch fixes it.
>
> Regards,
>
> --
> Bertrand Drouvot
> PostgreSQL Contributors Team
> RDS Open Source Databases
> Amazon Web Services: https://aws.amazon.com
> <v1-0001-Use-pg_icu_unicode_version-void-instead-of-pg_icu.patch>

This patch is straightforward.

What I'm interested in is the broader policy: when reviewing patches, if we encounter a foo() declaration, should we
consistentlyrequest a change to foo(void)? If yes, the standard should be documented somewhere. 

Best regards,
--
Chao Li (Evan)
HighGo Software Co., Ltd.
https://www.highgo.com/







pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: [PATCH] Support automatic sequence replication
Next
From: Mahendra Singh Thalor
Date:
Subject: pg_restore add --no-globals option when restored using pg_dumpall non-text dump