Skip to content

Commit

Permalink
some VS2017 compatibility
Browse files Browse the repository at this point in the history
Signed-off-by: Sergey Isakov <isakov-sl@bk.ru>
  • Loading branch information
SergeySlice committed Jan 23, 2022
1 parent f75f093 commit 718db61
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
12 changes: 10 additions & 2 deletions Include/Intel/Protocol/CpuIo.h
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,16 @@ Module Name:
--*/



#ifndef _CPUIO_H_
#define _CPUIO_H_

#include <Uefi/UefiBaseType.h>




#define EFI_CPU_IO_PROTOCOL_GUID \
{ \
0xB0732526, 0x38C8, 0x4b40, { 0x88, 0x77, 0x61, 0xC7, 0xB0, 0x6A, 0xAC, 0x45 } \
Expand Down Expand Up @@ -59,15 +66,16 @@ typedef enum {
//
typedef
EFI_STATUS
EFIAPI
(EFIAPI *EFI_CPU_IO_PROTOCOL_IO_MEM) (

( *EFI_CPU_IO_PROTOCOL_IO_MEM) (
IN EFI_CPU_IO_PROTOCOL * This,
IN EFI_CPU_IO_PROTOCOL_WIDTH Width,
IN UINT64 Address,
IN UINTN Count,
IN OUT VOID *Buffer
);


//
// *******************************************************
// EFI_CPU_IO_PROTOCOL_ACCESS
Expand Down
4 changes: 2 additions & 2 deletions Library/OcAcpiLib/OcAcpiLib.c
Original file line number Diff line number Diff line change
Expand Up @@ -631,8 +631,8 @@ AcpiNormalizeTableHeaders (

Modified = FALSE;

Walker = (CHAR8 *) &Table->Signature;
for (Index = 0; Index < sizeof (Table->Signature); ++Index) {
Walker = (CHAR8 *) &Table->SignatureCommon.Signature;
for (Index = 0; Index < sizeof (Table->SignatureCommon.Signature); ++Index) {
if (!IsAsciiPrint (Walker[Index])) {
Walker[Index] = '?';
Modified = TRUE;
Expand Down
4 changes: 2 additions & 2 deletions Library/OcMiscLib/DataPatcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,13 +39,13 @@ FindPattern (
// ASSERT (DataOff >= 0);

if (PatternSize == 0 || DataSize == 0 || *DataOff >= DataSize || DataSize - *DataOff < PatternSize) {
return -1;
return FALSE;
}

UINTN result = FindMemMask(Data + *DataOff, DataSize, Pattern, PatternSize, PatternMask, PatternSize);
if (result != MAX_UINTN) {
if ( result < MAX_INT32 - *DataOff ) {
*DataOff = result;
*DataOff = (UINT32)result;
return TRUE;
}
}
Expand Down
1 change: 1 addition & 0 deletions Library/OcStringLib/OcStringLib.inf
Original file line number Diff line number Diff line change
Expand Up @@ -45,3 +45,4 @@
MemoryAllocationLib
PrintLib
SortLib
OcGuardLib

0 comments on commit 718db61

Please sign in to comment.