]> git.ipfire.org Git - thirdparty/xz.git/commitdiff
tuklib_physmem: Clean up disabled code
authorLasse Collin <lasse.collin@tukaani.org>
Tue, 28 Jan 2025 14:33:32 +0000 (16:33 +0200)
committerLasse Collin <lasse.collin@tukaani.org>
Wed, 29 Jan 2025 18:59:51 +0000 (20:59 +0200)
src/common/tuklib_physmem.c

index 1009df14d9d15f3263593e2f908a2d4767667db2..91f2d196d157b76720bd6d27ec996c0dd6e698d3 100644 (file)
@@ -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);