mirror of
https://git.tukaani.org/xz.git
synced 2025-02-22 16:38:11 +00:00
tuklib_physmem: Clean up disabled code
This commit is contained in:
parent
4d7e7c9d94
commit
999ce26371
@ -91,18 +91,11 @@ tuklib_physmem(void)
|
||||
// supports reporting values greater than 4 GiB. To keep the
|
||||
// code working also on older Windows versions, use
|
||||
// GlobalMemoryStatusEx() conditionally.
|
||||
HMODULE kernel32 = GetModuleHandle(TEXT("kernel32.dll"));
|
||||
HMODULE kernel32 = GetModuleHandleA("kernel32.dll");
|
||||
if (kernel32 != NULL) {
|
||||
typedef BOOL (WINAPI *gmse_type)(LPMEMORYSTATUSEX);
|
||||
#ifdef CAN_DISABLE_WCAST_FUNCTION_TYPE
|
||||
# pragma GCC diagnostic push
|
||||
# pragma GCC diagnostic ignored "-Wcast-function-type"
|
||||
#endif
|
||||
gmse_type gmse = (gmse_type)GetProcAddress(
|
||||
kernel32, "GlobalMemoryStatusEx");
|
||||
#ifdef CAN_DISABLE_WCAST_FUNCTION_TYPE
|
||||
# pragma GCC diagnostic pop
|
||||
#endif
|
||||
if (gmse != NULL) {
|
||||
MEMORYSTATUSEX meminfo;
|
||||
meminfo.dwLength = sizeof(meminfo);
|
||||
|
Loading…
x
Reference in New Issue
Block a user