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

Started by Tom Lane4 months ago1 messagescomitters
Jump to latest
#1Tom Lane
tgl@sss.pgh.pa.us

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.pg@gmail.com>
Reported-by: Nazir Bilal Yavuz <byavuz81@gmail.com>
Diagnosed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: /messages/by-id/CAN55FZ1VDwJ-ZD092ChYf++huP+-S3Cg45tJ8jNH5wx2c4BHAg@mail.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(-)