pgsql: Fix -Wstrict-prototypes warning in ecpg_init_sqlca() declaration

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Fix -Wstrict-prototypes warning in ecpg_init_sqlca() declaration
Date: 2026-03-18 19:28:01
Message-ID: E1w2wYi-000Ngw-0r@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Fix -Wstrict-prototypes warning in ecpg_init_sqlca() declaration.

When headerscheck compiles ecpglib_extern.h, POSTGRES_ECPG_INTERNAL is
not defined, causing sqlca.h to expand "sqlca" as a macro
(*ECPGget_sqlca()). This causes the ecpg_init_sqlca() declaration to
trigger a -Wstrict-prototypes warning.

Fix by renaming the parameter from "sqlca" to "sqlca_p" in both the
declaration and definition, avoiding the macro expansion.

Author: Bertrand Drouvot <bertranddrouvot(dot)pg(at)gmail(dot)com>
Reported-by: Nazir Bilal Yavuz <byavuz81(at)gmail(dot)com>
Diagnosed-by: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Discussion: https://postgr.es/m/CAN55FZ1VDwJ-ZD092ChYf%2B%2BhuP%2B-S3Cg45tJ8jNH5wx2c4BHAg%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f91b8ff6af910744e6e317c5c2bc2698addde59a

Modified Files
--------------
src/interfaces/ecpg/ecpglib/ecpglib_extern.h | 2 +-
src/interfaces/ecpg/ecpglib/misc.c | 4 ++--
2 files changed, 3 insertions(+), 3 deletions(-)

Browse pgsql-committers by date

  From Date Subject
Next Message Daniel Gustafsson 2026-03-18 22:01:22 pgsql: ssl: Skip passphrase reload tests in EXEC_BACKEND builds
Previous Message Nathan Bossart 2026-03-18 19:23:04 pgsql: pg_restore: Remove unnecessary strlen() calls in options parsing