Fix compilation warnings

This commit is contained in:
momo5502
2025-05-31 09:52:18 +02:00
parent 5c0a1ce5c2
commit c50fdd17a4
10 changed files with 54 additions and 59 deletions

View File

@@ -20,11 +20,13 @@
#endif
#ifdef OS_WINDOWS
#define EXPORT_SYMBOL __declspec(dllexport)
#define IMPORT_SYMBOL __declspec(dllimport)
#define NO_INLINE __declspec(noinline)
#define EXPORT_SYMBOL __declspec(dllexport)
#define IMPORT_SYMBOL __declspec(dllimport)
#define NO_INLINE __declspec(noinline)
#ifndef DECLSPEC_ALIGN
#define DECLSPEC_ALIGN(n) __declspec(align(n))
#endif
#define RESTRICTED_POINTER

View File

@@ -72,8 +72,10 @@
#define SL_RETURN_SINGLE_ENTRY 0x02
#define SL_NO_CURSOR_UPDATE 0x10
#define SEC_IMAGE 0x01000000
#define SEC_RESERVE 0x04000000
#ifndef SEC_IMAGE
#define SEC_IMAGE 0x01000000
#define SEC_RESERVE 0x04000000
#endif
typedef enum _FSINFOCLASS
{

View File

@@ -2,23 +2,24 @@
// NOLINTBEGIN(modernize-use-using)
#define PAGE_EXECUTE 0x10
#define PAGE_EXECUTE_READ 0x20
#define PAGE_EXECUTE_READWRITE 0x40
#define PAGE_EXECUTE_WRITECOPY 0x80
#define PAGE_EXECUTE 0x10
#define PAGE_EXECUTE_READ 0x20
#define PAGE_EXECUTE_READWRITE 0x40
#define PAGE_EXECUTE_WRITECOPY 0x80
#define PAGE_NOACCESS 0x01
#define PAGE_READONLY 0x02
#define PAGE_READWRITE 0x04
#define PAGE_WRITECOPY 0x08
#define PAGE_NOACCESS 0x01
#define PAGE_READONLY 0x02
#define PAGE_READWRITE 0x04
#define PAGE_WRITECOPY 0x08
#define PAGE_TARGETS_INVALID 0x40000000
#define PAGE_TARGETS_NO_UPDATE 0x40000000
#define PAGE_TARGETS_INVALID 0x40000000
#define PAGE_TARGETS_NO_UPDATE 0x40000000
#define PAGE_GUARD 0x100
#define PAGE_NOCACHE 0x200
#define PAGE_WRITECOMBINE 0x400
#define PAGE_GUARD 0x100
#define PAGE_NOCACHE 0x200
#define PAGE_WRITECOMBINE 0x400
#ifndef MEM_64K_PAGES
#define MEM_COMMIT 0x00001000
#define MEM_RESERVE 0x00002000
#define MEM_DECOMMIT 0x00004000
@@ -37,6 +38,7 @@
#define MEM_DOS_LIM 0x40000000
#define MEM_4MB_PAGES 0x80000000
#define MEM_64K_PAGES (MEM_LARGE_PAGES | MEM_PHYSICAL)
#endif
typedef enum _MEMORY_INFORMATION_CLASS
{
@@ -64,7 +66,11 @@ typedef enum _SECTION_INHERIT
ViewUnmap = 2
} SECTION_INHERIT;
typedef struct DECLSPEC_ALIGN(16) _EMU_MEMORY_BASIC_INFORMATION64
typedef struct
#ifndef __MINGW64__
DECLSPEC_ALIGN(16)
#endif
_EMU_MEMORY_BASIC_INFORMATION64
{
uint64_t BaseAddress;
uint64_t AllocationBase;

View File

@@ -1,6 +1,6 @@
#pragma once
#ifdef _WIN32
#if defined(_WIN32) && !defined(__MINGW64__)
#pragma warning(push)
#pragma warning(disable : 4201) // nameless struct/union
#pragma warning(disable : 4702) // unreachable code
@@ -31,6 +31,6 @@
#pragma GCC diagnostic pop
#endif
#ifdef OS_WINDOWS
#if defined(_WIN32) && !defined(__MINGW64__)
#pragma warning(pop)
#endif

View File

@@ -591,7 +591,11 @@ using NEON128 = struct _NEON128
LONGLONG High;
};
typedef struct DECLSPEC_ALIGN(16) _CONTEXT64
typedef struct
#if !defined(__MINGW64__)
DECLSPEC_ALIGN(16)
#endif
_CONTEXT64
{
DWORD64 P1Home;
DWORD64 P2Home;