mirror of
https://gitlab.gnome.org/GNOME/glib.git
synced 2024-12-25 15:06:14 +01:00
Fix signedness warnings in glib/gwin32.c
glib/gwin32.c: In function 'g_win32_check_windows_version': glib/gwin32.c:556:32: warning: comparison of integer expressions of different signedness: 'DWORD' {aka 'long unsigned int'} and 'gint' {aka 'const int'} if (osverinfo.dwMajorVersion > major) ^ glib/gwin32.c:558:37: warning: comparison of integer expressions of different signedness: 'DWORD' {aka 'long unsigned int'} and 'gint' {aka 'const int'} else if (osverinfo.dwMajorVersion == major) ^~ glib/gwin32.c:560:36: warning: comparison of integer expressions of different signedness: 'DWORD' {aka 'long unsigned int'} and 'gint' {aka 'const int'} if (osverinfo.dwMinorVersion > minor) ^ glib/gwin32.c:562:41: warning: comparison of integer expressions of different signedness: 'DWORD' {aka 'long unsigned int'} and 'gint' {aka 'const int'} else if (osverinfo.dwMinorVersion == minor) ^~
This commit is contained in:
parent
6971f4f264
commit
2f2e021a56
@ -534,7 +534,7 @@ g_win32_check_windows_version (const gint major,
|
||||
HMODULE hmodule;
|
||||
#endif
|
||||
/* We Only Support Checking for XP or later */
|
||||
g_return_val_if_fail (major >= 5 && (major <=6 || major == 10), FALSE);
|
||||
g_return_val_if_fail (major >= 5 && (major <= 6 || major == 10), FALSE);
|
||||
g_return_val_if_fail ((major >= 5 && minor >= 1) || major >= 6, FALSE);
|
||||
|
||||
/* Check for Service Pack Version >= 0 */
|
||||
@ -553,14 +553,14 @@ g_win32_check_windows_version (const gint major,
|
||||
RtlGetVersion (&osverinfo);
|
||||
|
||||
/* check the OS and Service Pack Versions */
|
||||
if (osverinfo.dwMajorVersion > major)
|
||||
if (osverinfo.dwMajorVersion > (DWORD) major)
|
||||
is_ver_checked = TRUE;
|
||||
else if (osverinfo.dwMajorVersion == major)
|
||||
else if (osverinfo.dwMajorVersion == (DWORD) major)
|
||||
{
|
||||
if (osverinfo.dwMinorVersion > minor)
|
||||
if (osverinfo.dwMinorVersion > (DWORD) minor)
|
||||
is_ver_checked = TRUE;
|
||||
else if (osverinfo.dwMinorVersion == minor)
|
||||
if (osverinfo.wServicePackMajor >= spver)
|
||||
else if (osverinfo.dwMinorVersion == (DWORD) minor)
|
||||
if (osverinfo.wServicePackMajor >= (DWORD) spver)
|
||||
is_ver_checked = TRUE;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user