Fix printf format string warning on MinGW. REL_16_STABLE github/REL_16_STABLE
authorThomas Munro <[email protected]>
Thu, 5 Dec 2024 23:34:33 +0000 (12:34 +1300)
committerThomas Munro <[email protected]>
Sun, 21 Dec 2025 08:14:54 +0000 (21:14 +1300)
commitb1316b78f8a93a077a9db589644103037c0c1aa6
treefca6aca0d045803b693e385cd1ab5b6a1eccdd58
parent0666ccc16cc2d1b97032e7723601dbf5300d057d
Fix printf format string warning on MinGW.

This is a back-patch of 1319997d to branches 14-17 to fix an old warning
about a printf type mismatch on MinGW, in anticipation of a potential
expansion of the scope of CI's CompilerWarnings checks.  Though CI began
in 15, BF animal fairwren also shows the warning in 14, so we might as
well fix that too.

Original commit message (except for new "Backpatch-through" tag):

Commit 517bf2d91 changed a printf format string to placate MinGW, which
at the time warned about "%lld".  Current MinGW is now warning about the
replacement "%I64d".  Reverting the change clears the warning on the
MinGW CI task, and hopefully it will clear it on build farm animal
fairywren too.

Backpatch-through: 14-17
Reviewed-by: Tom Lane <[email protected]>
Reported-by: "Hayato Kuroda (Fujitsu)" <[email protected]>
Discussion: https://postgr.es/m/TYAPR01MB5866A71B744BE01B3BF71791F5AEA%40TYAPR01MB5866.jpnprd01.prod.outlook.com
src/interfaces/ecpg/test/expected/sql-sqlda.c
src/interfaces/ecpg/test/expected/sql-sqlda.stderr
src/interfaces/ecpg/test/sql/sqlda.pgc