mirror of https://github.com/acpica/acpica/
EFI/EDK2: Enable /WX for MSVC builds
/WX turns warning into fatal erros for MSVC builds. We need /WX- during EDK2 porting to allow agile development. Now it is time to enable /WX. Lv Zheng. Signed-off-by: Lv Zheng <lv.zheng@intel.com>
This commit is contained in:
parent
f9450316d8
commit
a7c6d65a5d
|
@ -55,7 +55,7 @@
|
|||
BaseLib
|
||||
|
||||
[BuildOptions]
|
||||
MSFT:*_*_IA32_CC_FLAGS = /GL- /WX- /D_EDK2_EFI /DUSE_MS_ABI /D__i386__ /DACPI_DUMP_APP
|
||||
MSFT:*_*_X64_CC_FLAGS = /GL- /WX- /D_EDK2_EFI /DUSE_MS_ABI /D__x86_64__ /DACPI_DUMP_APP
|
||||
MSFT:*_*_IA32_CC_FLAGS = /GL- /D_EDK2_EFI /DUSE_MS_ABI /D__i386__ /DACPI_DUMP_APP
|
||||
MSFT:*_*_X64_CC_FLAGS = /GL- /D_EDK2_EFI /DUSE_MS_ABI /D__x86_64__ /DACPI_DUMP_APP
|
||||
GCC:*_*_IA32_CC_FLAGS = -U__linux__ -U_LINUX -D_EDK2_EFI -DACPI_DUMP_APP -fno-builtin -iwithprefix include
|
||||
GCC:*_*_X64_CC_FLAGS = -U__linux__ -U_LINUX -D_EDK2_EFI -DACPI_DUMP_APP -fno-builtin -iwithprefix include
|
||||
|
|
|
@ -59,7 +59,7 @@
|
|||
UefiRuntimeServicesTableLib
|
||||
|
||||
[BuildOptions]
|
||||
MSFT:*_*_IA32_CC_FLAGS = /WX- /D_EDK2_EFI /DACPI_DUMP_APP /DUSE_MS_ABI /DUSE_STDLIB /D__i386__
|
||||
MSFT:*_*_X64_CC_FLAGS = /WX- /D_EDK2_EFI /DACPI_DUMP_APP /DUSE_MS_ABI /DUSE_STDLIB /D__x86_64__
|
||||
MSFT:*_*_IA32_CC_FLAGS = /D_EDK2_EFI /DACPI_DUMP_APP /DUSE_MS_ABI /DUSE_STDLIB /D__i386__
|
||||
MSFT:*_*_X64_CC_FLAGS = /D_EDK2_EFI /DACPI_DUMP_APP /DUSE_MS_ABI /DUSE_STDLIB /D__x86_64__
|
||||
GCC:*_*_IA32_CC_FLAGS = -U__linux__ -U_LINUX -D_EDK2_EFI -DACPI_DUMP_APP -DUSE_STDLIB -fno-builtin -iwithprefix include
|
||||
GCC:*_*_X64_CC_FLAGS = -U__linux__ -U_LINUX -D_EDK2_EFI -DACPI_DUMP_APP -DUSE_STDLIB -fno-builtin -iwithprefix include
|
||||
|
|
|
@ -762,7 +762,7 @@ strstr (
|
|||
char *String1,
|
||||
char *String2)
|
||||
{
|
||||
UINT32 Length;
|
||||
ACPI_SIZE Length;
|
||||
|
||||
|
||||
Length = strlen (String2);
|
||||
|
|
|
@ -463,7 +463,7 @@ AcpiUtFormatNumber (
|
|||
/* Generate full string in reverse order */
|
||||
|
||||
Pos = AcpiUtPutNumber (ReversedString, Number, Base, Upper);
|
||||
i = ACPI_PTR_DIFF (Pos, ReversedString);
|
||||
i = (INT32) ACPI_PTR_DIFF (Pos, ReversedString);
|
||||
|
||||
/* Printing 100 using %2d gives "100", not "00" */
|
||||
|
||||
|
@ -695,7 +695,7 @@ vsnprintf (
|
|||
{
|
||||
s = "<NULL>";
|
||||
}
|
||||
Length = AcpiUtBoundStringLength (s, Precision);
|
||||
Length = (INT32) AcpiUtBoundStringLength (s, Precision);
|
||||
if (!(Type & ACPI_FORMAT_LEFT))
|
||||
{
|
||||
while (Length < Width--)
|
||||
|
@ -815,7 +815,7 @@ vsnprintf (
|
|||
}
|
||||
}
|
||||
|
||||
return (ACPI_PTR_DIFF (Pos, String));
|
||||
return ((int) ACPI_PTR_DIFF (Pos, String));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -351,10 +351,10 @@ UINT64 efi_call10(void *func, UINT64 arg1, UINT64 arg2, UINT64 arg3,
|
|||
* support.
|
||||
*/
|
||||
#ifndef ACPI_DIV_64_BY_32
|
||||
#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \
|
||||
do { \
|
||||
UINT64 __n = ((UINT64) n_hi) << 32 | (n_lo); \
|
||||
(q32) = DivU64x32 ((__n), (d32), &(r32)); \
|
||||
#define ACPI_DIV_64_BY_32(n_hi, n_lo, d32, q32, r32) \
|
||||
do { \
|
||||
UINT64 __n = ((UINT64) n_hi) << 32 | (n_lo); \
|
||||
(q32) = (UINT32) DivU64x32 ((__n), (d32), &(r32)); \
|
||||
} while (0)
|
||||
#endif
|
||||
|
||||
|
|
|
@ -621,7 +621,7 @@ WaitKey:
|
|||
break;
|
||||
}
|
||||
}
|
||||
Length = Pos;
|
||||
Length = (int) Pos;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -641,7 +641,7 @@ WaitKey:
|
|||
Length = -EIO;
|
||||
goto ErrorExit;
|
||||
}
|
||||
Length = ReadSize;
|
||||
Length = (int) ReadSize;
|
||||
}
|
||||
|
||||
ErrorExit:
|
||||
|
@ -720,7 +720,7 @@ fwrite (
|
|||
const char *Ascii;
|
||||
CHAR16 *End;
|
||||
CHAR16 *Pos;
|
||||
int i, j;
|
||||
ACPI_SIZE i, j;
|
||||
ACPI_EFI_FILE_HANDLE EfiFile;
|
||||
UINTN WriteSize;
|
||||
ACPI_EFI_STATUS EfiStatus;
|
||||
|
@ -773,7 +773,7 @@ fwrite (
|
|||
errno = EIO;
|
||||
goto ErrorExit;
|
||||
}
|
||||
Length = WriteSize;
|
||||
Length = (int) WriteSize;
|
||||
}
|
||||
|
||||
ErrorExit:
|
||||
|
@ -926,7 +926,7 @@ fseek (
|
|||
{
|
||||
return (Error);
|
||||
}
|
||||
Size = Info->FileSize;
|
||||
Size = (ACPI_SIZE) (Info->FileSize);
|
||||
AcpiOsFree (Info);
|
||||
|
||||
if (From == SEEK_CUR)
|
||||
|
|
|
@ -184,7 +184,7 @@ OslAddTableToList (
|
|||
|
||||
static ACPI_STATUS
|
||||
OslMapTable (
|
||||
ACPI_SIZE Address,
|
||||
ACPI_PHYSICAL_ADDRESS Address,
|
||||
char *Signature,
|
||||
ACPI_TABLE_HEADER **Table);
|
||||
|
||||
|
@ -544,7 +544,7 @@ OslLoadRsdp (
|
|||
/* Search low memory for the RSDP */
|
||||
|
||||
MappedTable = ACPI_CAST_PTR (ACPI_TABLE_HEADER,
|
||||
AcpiTbScanMemoryForRsdp (RsdpAddress, RsdpSize));
|
||||
AcpiTbScanMemoryForRsdp (RsdpAddress, (UINT32) RsdpSize));
|
||||
if (!MappedTable)
|
||||
{
|
||||
AcpiOsUnmapMemory (RsdpAddress, RsdpSize);
|
||||
|
@ -1072,7 +1072,7 @@ Exit:
|
|||
|
||||
static ACPI_STATUS
|
||||
OslMapTable (
|
||||
ACPI_SIZE Address,
|
||||
ACPI_PHYSICAL_ADDRESS Address,
|
||||
char *Signature,
|
||||
ACPI_TABLE_HEADER **Table)
|
||||
{
|
||||
|
|
|
@ -234,7 +234,7 @@ AcpiEfiGetRsdpViaGuid (
|
|||
ACPI_EFI_GUID *Guid)
|
||||
{
|
||||
ACPI_PHYSICAL_ADDRESS Address = 0;
|
||||
int i;
|
||||
UINTN i;
|
||||
|
||||
|
||||
for (i = 0; i < ST->NumberOfTableEntries; i++)
|
||||
|
@ -527,7 +527,7 @@ AcpiOsGetTimer (
|
|||
EfiStatus = uefi_call_wrapper (RT->GetTime, 2, &EfiTime, NULL);
|
||||
if (ACPI_EFI_ERROR (EfiStatus))
|
||||
{
|
||||
return (-1);
|
||||
return ((UINT64) -1);
|
||||
}
|
||||
|
||||
Year = EfiTime.Year;
|
||||
|
|
Loading…
Reference in New Issue