Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitfce6fd5

Browse files
committed
Fix MinGW %d vs %lu warnings in back branches.
Commit352f6f2 used %d instead of %lu to format DWORD (unsigned long)with psprintf(). The _WIN32_WINNT value recently changed for MinGW inREL_15_STABLE (commitd700e8d), so the code was suddenly beingcompiled, with warnings from gcc.The warnings were already fixed in 16+ by commits495ed0e anda9bc04bafter the _WIN32_WINNT value was increase there. 14 and 13 didn't warnbecause they still use a lower value for MinGW, and supported versionsof Visual Studio should compile the code in all live branches but don'tcheck our format string.The change doesn't affect the result: sizeof(int) == sizeof(long) onthis platform, and the values are computed with expressions that cannotexceed INT_MAX so were never interpreted as negative.Back-patch the formatting change from those commits into 13-15. Thisshould turn CI's 15 branch green again and stop fairywren from warningabout that on 15.Reported-by: Andres Freund <andres@anarazel.de>Reported-by: Peter Eisentraut <peter@eisentraut.org>Discussion:https://postgr.es/m/t2vjrcb3bloxf5qqvxjst6r7lvrefqyecxgt2koy5ho5b5glr2%40yuupmm6whgob
1 parentaa663d3 commitfce6fd5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎src/backend/utils/adt/pg_locale.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1759,7 +1759,7 @@ get_collation_actual_version(char collprovider, const char *collcollate)
17591759
collcollate,
17601760
GetLastError())));
17611761
}
1762-
collversion=psprintf("%d.%d,%d.%d",
1762+
collversion=psprintf("%lu.%lu,%lu.%lu",
17631763
(version.dwNLSVersion >>8)&0xFFFF,
17641764
version.dwNLSVersion&0xFF,
17651765
(version.dwDefinedVersion >>8)&0xFFFF,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp