pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix MinGW %d vs %lu warnings in back branches. 3+ messages / 1 participants [nested] [flat]
* pgsql: Fix MinGW %d vs %lu warnings in back branches. @ 2024-11-28 22:10 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Thomas Munro @ 2024-11-28 22:10 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix MinGW %d vs %lu warnings in back branches. Commit 352f6f2d used %d instead of %lu to format DWORD (unsigned long) with psprintf(). The _WIN32_WINNT value recently changed for MinGW in REL_15_STABLE (commit d700e8d7), so the code was suddenly being compiled, with warnings from gcc. The warnings were already fixed in 16+ by commits 495ed0ef and a9bc04b2 after the _WIN32_WINNT value was increase there. 14 and 13 didn't warn because they still use a lower value for MinGW, and supported versions of Visual Studio should compile the code in all live branches but don't check our format string. The change doesn't affect the result: sizeof(int) == sizeof(long) on this platform, and the values are computed with expressions that cannot exceed INT_MAX so were never interpreted as negative. Back-patch the formatting change from those commits into 13-15. This should turn CI's 15 branch green again and stop fairywren from warning about that on 15. Reported-by: Andres Freund <andres@anarazel.de> Reported-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/t2vjrcb3bloxf5qqvxjst6r7lvrefqyecxgt2koy5ho5b5glr2%40yuupmm6whgob Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/29cd8a41ccb500c475dc4c5bd9b88e1a8156ae7c Modified Files -------------- src/backend/utils/adt/pg_locale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix MinGW %d vs %lu warnings in back branches. @ 2024-11-28 22:10 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Thomas Munro @ 2024-11-28 22:10 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix MinGW %d vs %lu warnings in back branches. Commit 352f6f2d used %d instead of %lu to format DWORD (unsigned long) with psprintf(). The _WIN32_WINNT value recently changed for MinGW in REL_15_STABLE (commit d700e8d7), so the code was suddenly being compiled, with warnings from gcc. The warnings were already fixed in 16+ by commits 495ed0ef and a9bc04b2 after the _WIN32_WINNT value was increase there. 14 and 13 didn't warn because they still use a lower value for MinGW, and supported versions of Visual Studio should compile the code in all live branches but don't check our format string. The change doesn't affect the result: sizeof(int) == sizeof(long) on this platform, and the values are computed with expressions that cannot exceed INT_MAX so were never interpreted as negative. Back-patch the formatting change from those commits into 13-15. This should turn CI's 15 branch green again and stop fairywren from warning about that on 15. Reported-by: Andres Freund <andres@anarazel.de> Reported-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/t2vjrcb3bloxf5qqvxjst6r7lvrefqyecxgt2koy5ho5b5glr2%40yuupmm6whgob Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/fa92c18efe24041240eea8045bb5b714f4ee2134 Modified Files -------------- src/backend/utils/adt/pg_locale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Fix MinGW %d vs %lu warnings in back branches. @ 2024-11-28 22:10 Thomas Munro <tmunro@postgresql.org> 0 siblings, 0 replies; 3+ messages in thread From: Thomas Munro @ 2024-11-28 22:10 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix MinGW %d vs %lu warnings in back branches. Commit 352f6f2d used %d instead of %lu to format DWORD (unsigned long) with psprintf(). The _WIN32_WINNT value recently changed for MinGW in REL_15_STABLE (commit d700e8d7), so the code was suddenly being compiled, with warnings from gcc. The warnings were already fixed in 16+ by commits 495ed0ef and a9bc04b2 after the _WIN32_WINNT value was increase there. 14 and 13 didn't warn because they still use a lower value for MinGW, and supported versions of Visual Studio should compile the code in all live branches but don't check our format string. The change doesn't affect the result: sizeof(int) == sizeof(long) on this platform, and the values are computed with expressions that cannot exceed INT_MAX so were never interpreted as negative. Back-patch the formatting change from those commits into 13-15. This should turn CI's 15 branch green again and stop fairywren from warning about that on 15. Reported-by: Andres Freund <andres@anarazel.de> Reported-by: Peter Eisentraut <peter@eisentraut.org> Discussion: https://postgr.es/m/t2vjrcb3bloxf5qqvxjst6r7lvrefqyecxgt2koy5ho5b5glr2%40yuupmm6whgob Branch ------ REL_13_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/fce6fd5da580542e026ac023352cafcb97854fec Modified Files -------------- src/backend/utils/adt/pg_locale.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2024-11-28 22:10 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2024-11-28 22:10 pgsql: Fix MinGW %d vs %lu warnings in back branches. Thomas Munro <tmunro@postgresql.org> 2024-11-28 22:10 pgsql: Fix MinGW %d vs %lu warnings in back branches. Thomas Munro <tmunro@postgresql.org> 2024-11-28 22:10 pgsql: Fix MinGW %d vs %lu warnings in back branches. Thomas Munro <tmunro@postgresql.org>
This inbox is served by DDX for PostgreSQL; see mirroring instructions for how to clone and mirror all data and code used for this inbox