Re: Enable -Wstrict-prototypes and -Wold-style-definition by default
Nazir Bilal Yavuz <byavuz81@gmail.com>
From: Nazir Bilal Yavuz <byavuz81@gmail.com>
To: Peter Eisentraut <peter@eisentraut.org>
Cc: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>,
pgsql-hackers@lists.postgresql.org
Date: 2026-03-18T15:50:20Z
Lists: pgsql-hackers
Hi, Thank you for working on this! On Wed, 18 Mar 2026 at 16:32, Peter Eisentraut <peter@eisentraut.org> wrote: > > On 16.03.26 10:55, Peter Eisentraut wrote: > > On 09.03.26 17:39, Bertrand Drouvot wrote: > >> 0001: Prevent -Wstrict-prototypes and -Wold-style-definition warnings > >> > >> It fixes the remaining warnings that those new flags would generate. > > > > I have committed this one. I'll look at the rest next. > > Also committed. I got this warning while running headerscheck after this commit: ~/Desktop/projects/postgres/src/interfaces/ecpg/ecpglib/ecpglib_extern.h:221:40: warning: function declaration isn’t a prototype [-Wstrict-prototypes] 221 | void ecpg_init_sqlca(struct sqlca_t *sqlca) Another topic is that, CI already catched this [1] (and other not related things in cpluspluscheck). However, it seems that since we run headerscheck and cpluspluscheck with the '-fmax-errors=10' option; CI didn't fail. It would be good to remove '-fmax-errors=10', though. [1] https://cirrus-ci.com/task/5166361724321792?logs=headers_headerscheck#L0 -- Regards, Nazir Bilal Yavuz Microsoft
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Add warning option -Wold-style-declaration
- c73e8ee061ad 19 (unreleased) landed
-
configure: Apply -Werror=vla to C++ as well as C
- 488ab592d9ea 19 (unreleased) landed
-
Enable warning like -Wstrict-prototypes on MSVC as well
- b4a132022444 19 (unreleased) landed
-
Remove compiler warning option -Wendif-labels
- 87e1891c459e 19 (unreleased) landed
-
Disable warnings in system headers in MSVC
- bccfc73acde9 19 (unreleased) landed
-
Fix -Wstrict-prototypes warning in ecpg_init_sqlca() declaration.
- f91b8ff6af91 19 (unreleased) landed