mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-31 01:24:12 +02:00
Fix various warnings with the Intel C compiler.
EfiBind.h: * Adding ignores for certain warnings with the Intel C compiler. (Partially merged from MdePkg.) EfiPxe.h: * Make sure PXE_NO_UINT64_SUPPORT is defined Decompress.c: * Removed 'unreachable' return statement. EdkCompatibilityPkg/**: (all other files) * Remove trailing comma from last value in enum. * Include <EfiBind.h> instead of "EfiBind.h", or for some reason __STDC_VERSION__ is not defined. * Introduce more explicit function call ordering by storing results in local variables before using in a calculation. * Add some additional casting for BOOLEAN & UINT8 following calculations which change the type to 'int'. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@5123 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
8067d3032c
commit
4cb43192bd
@ -414,10 +414,10 @@ EFI_STATUS
|
|||||||
typedef enum {
|
typedef enum {
|
||||||
EfiResetCold,
|
EfiResetCold,
|
||||||
EfiResetWarm,
|
EfiResetWarm,
|
||||||
EfiResetShutdown,
|
EfiResetShutdown
|
||||||
|
|
||||||
#if ((TIANO_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))
|
#if ((TIANO_RELEASE_VERSION != 0) && (EFI_SPECIFICATION_VERSION < 0x00020000))
|
||||||
EfiResetUpdate
|
, EfiResetUpdate
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
} EFI_RESET_TYPE;
|
} EFI_RESET_TYPE;
|
||||||
|
@ -78,7 +78,7 @@ typedef enum _EFI_MEMORY_ARRAY_USE {
|
|||||||
EfiMemoryArrayUseVideoMemory = 0x04,
|
EfiMemoryArrayUseVideoMemory = 0x04,
|
||||||
EfiMemoryArrayUseFlashMemory = 0x05,
|
EfiMemoryArrayUseFlashMemory = 0x05,
|
||||||
EfiMemoryArrayUseNonVolatileRam = 0x06,
|
EfiMemoryArrayUseNonVolatileRam = 0x06,
|
||||||
EfiMemoryArrayUseCacheMemory = 0x07,
|
EfiMemoryArrayUseCacheMemory = 0x07
|
||||||
} EFI_MEMORY_ARRAY_USE;
|
} EFI_MEMORY_ARRAY_USE;
|
||||||
|
|
||||||
typedef enum _EFI_MEMORY_ERROR_CORRECTION {
|
typedef enum _EFI_MEMORY_ERROR_CORRECTION {
|
||||||
@ -88,7 +88,7 @@ typedef enum _EFI_MEMORY_ERROR_CORRECTION {
|
|||||||
EfiMemoryErrorCorrectionParity = 0x04,
|
EfiMemoryErrorCorrectionParity = 0x04,
|
||||||
EfiMemoryErrorCorrectionSingleBitEcc = 0x05,
|
EfiMemoryErrorCorrectionSingleBitEcc = 0x05,
|
||||||
EfiMemoryErrorCorrectionMultiBitEcc = 0x06,
|
EfiMemoryErrorCorrectionMultiBitEcc = 0x06,
|
||||||
EfiMemoryErrorCorrectionCrc = 0x07,
|
EfiMemoryErrorCorrectionCrc = 0x07
|
||||||
} EFI_MEMORY_ERROR_CORRECTION;
|
} EFI_MEMORY_ERROR_CORRECTION;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -137,7 +137,7 @@ typedef enum {
|
|||||||
EfiSystemWakeupTypeLanRemote = 5,
|
EfiSystemWakeupTypeLanRemote = 5,
|
||||||
EfiSystemWakeupTypePowerSwitch = 6,
|
EfiSystemWakeupTypePowerSwitch = 6,
|
||||||
EfiSystemWakeupTypePciPme = 7,
|
EfiSystemWakeupTypePciPme = 7,
|
||||||
EfiSystemWakeupTypeAcPowerRestored = 8,
|
EfiSystemWakeupTypeAcPowerRestored = 8
|
||||||
} EFI_MISC_SYSTEM_WAKEUP_TYPE;
|
} EFI_MISC_SYSTEM_WAKEUP_TYPE;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -180,7 +180,7 @@ typedef enum {
|
|||||||
EfiBaseBoardTypeMotherBoard = 0xA,
|
EfiBaseBoardTypeMotherBoard = 0xA,
|
||||||
EfiBaseBoardTypeProcessorMemoryModule = 0xB,
|
EfiBaseBoardTypeProcessorMemoryModule = 0xB,
|
||||||
EfiBaseBoardTypeProcessorIOModule = 0xC,
|
EfiBaseBoardTypeProcessorIOModule = 0xC,
|
||||||
EfiBaseBoardTypeInterconnectBoard = 0xD,
|
EfiBaseBoardTypeInterconnectBoard = 0xD
|
||||||
} EFI_BASE_BOARD_TYPE;
|
} EFI_BASE_BOARD_TYPE;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -248,7 +248,7 @@ typedef enum {
|
|||||||
EfiChassisStateSafe = 3,
|
EfiChassisStateSafe = 3,
|
||||||
EfiChassisStateWarning = 4,
|
EfiChassisStateWarning = 4,
|
||||||
EfiChassisStateCritical = 5,
|
EfiChassisStateCritical = 5,
|
||||||
EfiChassisStateNonRecoverable = 6,
|
EfiChassisStateNonRecoverable = 6
|
||||||
} EFI_MISC_CHASSIS_STATE;
|
} EFI_MISC_CHASSIS_STATE;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@ -256,7 +256,7 @@ typedef enum {
|
|||||||
EfiChassisSecurityStatusUnknown = 2,
|
EfiChassisSecurityStatusUnknown = 2,
|
||||||
EfiChassisSecurityStatusNone = 3,
|
EfiChassisSecurityStatusNone = 3,
|
||||||
EfiChassisSecurityStatusExternalInterfaceLockedOut = 4,
|
EfiChassisSecurityStatusExternalInterfaceLockedOut = 4,
|
||||||
EfiChassisSecurityStatusExternalInterfaceLockedEnabled = 5,
|
EfiChassisSecurityStatusExternalInterfaceLockedEnabled = 5
|
||||||
} EFI_MISC_CHASSIS_SECURITY_STATE;
|
} EFI_MISC_CHASSIS_SECURITY_STATE;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -338,7 +338,7 @@ typedef enum {
|
|||||||
EfiPortConnectorTypePCH98 = 0xA2,
|
EfiPortConnectorTypePCH98 = 0xA2,
|
||||||
EfiPortConnectorTypePC98Note = 0xA3,
|
EfiPortConnectorTypePC98Note = 0xA3,
|
||||||
EfiPortConnectorTypePC98Full = 0xA4,
|
EfiPortConnectorTypePC98Full = 0xA4,
|
||||||
EfiPortConnectorTypeOther = 0xFF,
|
EfiPortConnectorTypeOther = 0xFF
|
||||||
} EFI_MISC_PORT_CONNECTOR_TYPE;
|
} EFI_MISC_PORT_CONNECTOR_TYPE;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@ -378,7 +378,7 @@ typedef enum {
|
|||||||
EfiPortTypeSas = 0x21,
|
EfiPortTypeSas = 0x21,
|
||||||
EfiPortType8251Compatible = 0xA0,
|
EfiPortType8251Compatible = 0xA0,
|
||||||
EfiPortType8251FifoCompatible = 0xA1,
|
EfiPortType8251FifoCompatible = 0xA1,
|
||||||
EfiPortTypeOther = 0xFF,
|
EfiPortTypeOther = 0xFF
|
||||||
} EFI_MISC_PORT_TYPE;
|
} EFI_MISC_PORT_TYPE;
|
||||||
|
|
||||||
|
|
||||||
@ -445,14 +445,14 @@ typedef enum {
|
|||||||
EfiSlotDataBusWidth8xOrx8 = 0xB,
|
EfiSlotDataBusWidth8xOrx8 = 0xB,
|
||||||
EfiSlotDataBusWidth12xOrx12 = 0xC,
|
EfiSlotDataBusWidth12xOrx12 = 0xC,
|
||||||
EfiSlotDataBusWidth16xOrx16 = 0xD,
|
EfiSlotDataBusWidth16xOrx16 = 0xD,
|
||||||
EfiSlotDataBusWidth32xOrx32 = 0xE,
|
EfiSlotDataBusWidth32xOrx32 = 0xE
|
||||||
} EFI_MISC_SLOT_DATA_BUS_WIDTH;
|
} EFI_MISC_SLOT_DATA_BUS_WIDTH;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
EfiSlotUsageOther = 1,
|
EfiSlotUsageOther = 1,
|
||||||
EfiSlotUsageUnknown = 2,
|
EfiSlotUsageUnknown = 2,
|
||||||
EfiSlotUsageAvailable = 3,
|
EfiSlotUsageAvailable = 3,
|
||||||
EfiSlotUsageInUse = 4,
|
EfiSlotUsageInUse = 4
|
||||||
} EFI_MISC_SLOT_USAGE;
|
} EFI_MISC_SLOT_USAGE;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@ -613,7 +613,7 @@ typedef enum {
|
|||||||
EfiPointingDeviceTypeGlidePoint = 6,
|
EfiPointingDeviceTypeGlidePoint = 6,
|
||||||
EfiPointingDeviceTouchPad = 7,
|
EfiPointingDeviceTouchPad = 7,
|
||||||
EfiPointingDeviceTouchScreen = 8,
|
EfiPointingDeviceTouchScreen = 8,
|
||||||
EfiPointingDeviceOpticalSensor = 9,
|
EfiPointingDeviceOpticalSensor = 9
|
||||||
} EFI_MISC_POINTING_DEVICE_TYPE;
|
} EFI_MISC_POINTING_DEVICE_TYPE;
|
||||||
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
@ -627,7 +627,7 @@ typedef enum {
|
|||||||
EfiPointingDeviceInterfaceADB = 8,
|
EfiPointingDeviceInterfaceADB = 8,
|
||||||
EfiPointingDeviceInterfaceBusMouseDB9 = 0xA0,
|
EfiPointingDeviceInterfaceBusMouseDB9 = 0xA0,
|
||||||
EfiPointingDeviceInterfaceBusMouseMicroDin = 0xA1,
|
EfiPointingDeviceInterfaceBusMouseMicroDin = 0xA1,
|
||||||
EfiPointingDeviceInterfaceUsb = 0xA2,
|
EfiPointingDeviceInterfaceUsb = 0xA2
|
||||||
} EFI_MISC_POINTING_DEVICE_INTERFACE;
|
} EFI_MISC_POINTING_DEVICE_INTERFACE;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -652,7 +652,7 @@ typedef enum {
|
|||||||
EfiPortableBatteryDeviceChemistryNickelMetalHydride = 5,
|
EfiPortableBatteryDeviceChemistryNickelMetalHydride = 5,
|
||||||
EfiPortableBatteryDeviceChemistryLithiumIon = 6,
|
EfiPortableBatteryDeviceChemistryLithiumIon = 6,
|
||||||
EfiPortableBatteryDeviceChemistryZincAir = 7,
|
EfiPortableBatteryDeviceChemistryZincAir = 7,
|
||||||
EfiPortableBatteryDeviceChemistryLithiumPolymer = 8,
|
EfiPortableBatteryDeviceChemistryLithiumPolymer = 8
|
||||||
} EFI_MISC_PORTABLE_BATTERY_DEVICE_CHEMISTRY;
|
} EFI_MISC_PORTABLE_BATTERY_DEVICE_CHEMISTRY;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -908,7 +908,7 @@ typedef enum {
|
|||||||
EfiBootInformationStatusWatchdogTimerExpired = 8,
|
EfiBootInformationStatusWatchdogTimerExpired = 8,
|
||||||
EfiBootInformationStatusStartReserved = 9,
|
EfiBootInformationStatusStartReserved = 9,
|
||||||
EfiBootInformationStatusStartOemSpecific = 128,
|
EfiBootInformationStatusStartOemSpecific = 128,
|
||||||
EfiBootInformationStatusStartProductSpecific = 192,
|
EfiBootInformationStatusStartProductSpecific = 192
|
||||||
} EFI_MISC_BOOT_INFORMATION_STATUS_TYPE;
|
} EFI_MISC_BOOT_INFORMATION_STATUS_TYPE;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
@ -977,7 +977,7 @@ typedef enum {
|
|||||||
EfiIpmiOther = 0,
|
EfiIpmiOther = 0,
|
||||||
EfiIpmiKcs = 1,
|
EfiIpmiKcs = 1,
|
||||||
EfiIpmiSmic = 2,
|
EfiIpmiSmic = 2,
|
||||||
EfiIpmiBt = 3,
|
EfiIpmiBt = 3
|
||||||
} EFI_MISC_IPMI_INTERFACE_TYPE;
|
} EFI_MISC_IPMI_INTERFACE_TYPE;
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
|
@ -22,7 +22,7 @@ Abstract:
|
|||||||
#ifndef _TIANO_SPEC_ERROR_H_
|
#ifndef _TIANO_SPEC_ERROR_H_
|
||||||
#define _TIANO_SPEC_ERROR_H_
|
#define _TIANO_SPEC_ERROR_H_
|
||||||
|
|
||||||
#include "EfiBind.h"
|
#include <EfiBind.h>
|
||||||
#define TIANO_ERROR(a) (MAX_2_BITS | (a))
|
#define TIANO_ERROR(a) (MAX_2_BITS | (a))
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -36,7 +36,7 @@ Abstract:
|
|||||||
//
|
//
|
||||||
typedef enum {
|
typedef enum {
|
||||||
PeiResetCold,
|
PeiResetCold,
|
||||||
PeiResetWarm,
|
PeiResetWarm
|
||||||
} PEI_RESET_TYPE;
|
} PEI_RESET_TYPE;
|
||||||
|
|
||||||
typedef
|
typedef
|
||||||
|
@ -218,7 +218,7 @@ typedef enum {
|
|||||||
Compatibility16DispatchOprom = 0x0005,
|
Compatibility16DispatchOprom = 0x0005,
|
||||||
Compatibility16GetTableAddress = 0x0006,
|
Compatibility16GetTableAddress = 0x0006,
|
||||||
Compatibility16SetKeyboardLeds = 0x0007,
|
Compatibility16SetKeyboardLeds = 0x0007,
|
||||||
Compatibility16InstallPciHandler = 0x0008,
|
Compatibility16InstallPciHandler = 0x0008
|
||||||
} EFI_COMPATIBILITY_FUNCTIONS;
|
} EFI_COMPATIBILITY_FUNCTIONS;
|
||||||
|
|
||||||
//
|
//
|
||||||
|
@ -23,7 +23,7 @@ Abstract:
|
|||||||
#ifndef _TIANO_BIND_H_
|
#ifndef _TIANO_BIND_H_
|
||||||
#define _TIANO_BIND_H_
|
#define _TIANO_BIND_H_
|
||||||
|
|
||||||
#include "EfiBind.h"
|
#include <EfiBind.h>
|
||||||
|
|
||||||
#define EFI_DXE_ENTRY_POINT(InitFunction)
|
#define EFI_DXE_ENTRY_POINT(InitFunction)
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ Abstract:
|
|||||||
#ifndef _EFI_COMMON_H_
|
#ifndef _EFI_COMMON_H_
|
||||||
#define _EFI_COMMON_H_
|
#define _EFI_COMMON_H_
|
||||||
|
|
||||||
#include "EfiBind.h"
|
#include <EfiBind.h>
|
||||||
#include "EfiTypes.h"
|
#include "EfiTypes.h"
|
||||||
#include "EfiStdArg.h"
|
#include "EfiStdArg.h"
|
||||||
#include "EfiError.h"
|
#include "EfiError.h"
|
||||||
|
@ -33,7 +33,11 @@ Abstract:
|
|||||||
// #define PXE_NETWORK_ORDER 1 // network order
|
// #define PXE_NETWORK_ORDER 1 // network order
|
||||||
//
|
//
|
||||||
#define PXE_UINT64_SUPPORT 1 // UINT64 supported
|
#define PXE_UINT64_SUPPORT 1 // UINT64 supported
|
||||||
// #define PXE_NO_UINT64_SUPPORT 1 // UINT64 not supported
|
#if PXE_UINT64_SUPPORT == 0
|
||||||
|
#define PXE_NO_UINT64_SUPPORT 1
|
||||||
|
#else
|
||||||
|
#define PXE_NO_UINT64_SUPPORT 0
|
||||||
|
#endif
|
||||||
//
|
//
|
||||||
#define PXE_BUSTYPE(a, b, c, d) \
|
#define PXE_BUSTYPE(a, b, c, d) \
|
||||||
( \
|
( \
|
||||||
|
@ -23,7 +23,7 @@ Abstract:
|
|||||||
#ifndef _TIANO_BIND_H_
|
#ifndef _TIANO_BIND_H_
|
||||||
#define _TIANO_BIND_H_
|
#define _TIANO_BIND_H_
|
||||||
|
|
||||||
#include "EfiBind.h"
|
#include <EfiBind.h>
|
||||||
|
|
||||||
#ifdef EFI_DEBUG
|
#ifdef EFI_DEBUG
|
||||||
|
|
||||||
|
@ -160,7 +160,7 @@ enum {
|
|||||||
//
|
//
|
||||||
//Use 200 ms to increase the error handling response time
|
//Use 200 ms to increase the error handling response time
|
||||||
//
|
//
|
||||||
EFI_USB_INTERRUPT_DELAY = 2000000,
|
EFI_USB_INTERRUPT_DELAY = 2000000
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ Abstract:
|
|||||||
#ifndef _TIANO_BIND_H_
|
#ifndef _TIANO_BIND_H_
|
||||||
#define _TIANO_BIND_H_
|
#define _TIANO_BIND_H_
|
||||||
|
|
||||||
#include "EfiBind.h"
|
#include <EfiBind.h>
|
||||||
|
|
||||||
#define EFI_DXE_ENTRY_POINT(InitFunction)
|
#define EFI_DXE_ENTRY_POINT(InitFunction)
|
||||||
|
|
||||||
|
@ -37,6 +37,38 @@ Abstract:
|
|||||||
//
|
//
|
||||||
#pragma pack()
|
#pragma pack()
|
||||||
|
|
||||||
|
#if __INTEL_COMPILER
|
||||||
|
//
|
||||||
|
// Disable ICC's warning: trailing comma is nonstandard
|
||||||
|
//
|
||||||
|
//#pragma warning ( disable : 271 )
|
||||||
|
|
||||||
|
//
|
||||||
|
// Disable ICC's warning: extra ";" ignored
|
||||||
|
//
|
||||||
|
#pragma warning ( disable : 424 )
|
||||||
|
|
||||||
|
//
|
||||||
|
// Disable ICC's warning: : variable "foo" was set but never used
|
||||||
|
//
|
||||||
|
#pragma warning ( disable : 593 )
|
||||||
|
|
||||||
|
//
|
||||||
|
// Disable ICC's remark #1418: external function definition with no prior declaration.
|
||||||
|
// This is legal ANSI C code so we disable the remark that is turned on with /W4
|
||||||
|
//
|
||||||
|
#pragma warning ( disable : 1418 )
|
||||||
|
|
||||||
|
|
||||||
|
//
|
||||||
|
// Disable ICC's remark #1419: external declaration in primary source file
|
||||||
|
// This is legal ANSI C code so we disable the remark that is turned on with /W4
|
||||||
|
//
|
||||||
|
#pragma warning ( disable : 1419 )
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if _MSC_EXTENSIONS
|
#if _MSC_EXTENSIONS
|
||||||
|
|
||||||
//
|
//
|
||||||
@ -89,7 +121,7 @@ Abstract:
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
#if (__STDC_VERSION__ < 199901L)
|
#if !defined(__GNUC__) && (__STDC_VERSION__ < 199901L)
|
||||||
//
|
//
|
||||||
// No ANSI C 2000 stdint.h integer width declarations, so define equivalents
|
// No ANSI C 2000 stdint.h integer width declarations, so define equivalents
|
||||||
//
|
//
|
||||||
|
@ -23,7 +23,7 @@ Abstract:
|
|||||||
#ifndef _TIANO_BIND_H_
|
#ifndef _TIANO_BIND_H_
|
||||||
#define _TIANO_BIND_H_
|
#define _TIANO_BIND_H_
|
||||||
|
|
||||||
#include "EfiBind.h"
|
#include <EfiBind.h>
|
||||||
|
|
||||||
#define EFI_DXE_ENTRY_POINT(InitFunction)
|
#define EFI_DXE_ENTRY_POINT(InitFunction)
|
||||||
|
|
||||||
|
@ -119,6 +119,8 @@ Returns:
|
|||||||
UINT8 *Destination;
|
UINT8 *Destination;
|
||||||
UINTN Index;
|
UINTN Index;
|
||||||
BOOLEAN Finished;
|
BOOLEAN Finished;
|
||||||
|
UINTN SizeofLanguage;
|
||||||
|
UINTN SizeofString;
|
||||||
|
|
||||||
StringPack = (EFI_HII_STRING_PACK *) StringBuffer;
|
StringPack = (EFI_HII_STRING_PACK *) StringBuffer;
|
||||||
Finished = FALSE;
|
Finished = FALSE;
|
||||||
@ -239,14 +241,16 @@ Returns:
|
|||||||
//
|
//
|
||||||
// Pointing to a new string pack location
|
// Pointing to a new string pack location
|
||||||
//
|
//
|
||||||
|
SizeofLanguage = EfiStrSize (Language);
|
||||||
|
SizeofString = EfiStrSize (String);
|
||||||
StringPackBuffer->Header.Length = (UINT32)
|
StringPackBuffer->Header.Length = (UINT32)
|
||||||
(
|
(
|
||||||
sizeof (EFI_HII_STRING_PACK) -
|
sizeof (EFI_HII_STRING_PACK) -
|
||||||
sizeof (EFI_STRING) +
|
sizeof (EFI_STRING) +
|
||||||
sizeof (RELOFST) +
|
sizeof (RELOFST) +
|
||||||
sizeof (RELOFST) +
|
sizeof (RELOFST) +
|
||||||
EfiStrSize (Language) +
|
SizeofLanguage +
|
||||||
EfiStrSize (String)
|
SizeofString
|
||||||
);
|
);
|
||||||
StringPackBuffer->Header.Type = EFI_HII_STRING;
|
StringPackBuffer->Header.Type = EFI_HII_STRING;
|
||||||
StringPackBuffer->LanguageNameString = (UINT16) ((UINTN) &PackDestination[3] - (UINTN) StringPackBuffer);
|
StringPackBuffer->LanguageNameString = (UINT16) ((UINTN) &PackDestination[3] - (UINTN) StringPackBuffer);
|
||||||
|
@ -471,11 +471,15 @@ Returns:
|
|||||||
{
|
{
|
||||||
EFI_STATUS Status;
|
EFI_STATUS Status;
|
||||||
CHAR16 *NameSuffixed;
|
CHAR16 *NameSuffixed;
|
||||||
|
UINTN NameLength;
|
||||||
|
UINTN SuffixLength;
|
||||||
|
|
||||||
//
|
//
|
||||||
// enough to concatenate both strings.
|
// enough to concatenate both strings.
|
||||||
//
|
//
|
||||||
NameSuffixed = EfiLibAllocateZeroPool ((EfiStrLen (Name) + EfiStrLen (Suffix) + 1) * sizeof (CHAR16));
|
NameLength = EfiStrLen (Name);
|
||||||
|
SuffixLength = EfiStrLen (Suffix);
|
||||||
|
NameSuffixed = EfiLibAllocateZeroPool ((NameLength + SuffixLength + 1) * sizeof (CHAR16));
|
||||||
|
|
||||||
EfiStrCpy (NameSuffixed, Name);
|
EfiStrCpy (NameSuffixed, Name);
|
||||||
EfiStrCat (NameSuffixed, Suffix);
|
EfiStrCat (NameSuffixed, Suffix);
|
||||||
|
@ -118,7 +118,7 @@ UpdateFormPackageData (
|
|||||||
EfiCopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
|
EfiCopyMem (&PackageHeader, Package, sizeof (EFI_HII_PACKAGE_HEADER));
|
||||||
IfrOpHdr = (EFI_IFR_OP_HEADER *)((UINT8 *) Package + sizeof (EFI_HII_PACKAGE_HEADER));
|
IfrOpHdr = (EFI_IFR_OP_HEADER *)((UINT8 *) Package + sizeof (EFI_HII_PACKAGE_HEADER));
|
||||||
Offset = sizeof (EFI_HII_PACKAGE_HEADER);
|
Offset = sizeof (EFI_HII_PACKAGE_HEADER);
|
||||||
GetFormSet = (FormSetGuid == NULL) ? TRUE : FALSE;
|
GetFormSet = (BOOLEAN)((FormSetGuid == NULL) ? TRUE : FALSE);
|
||||||
GetForm = FALSE;
|
GetForm = FALSE;
|
||||||
Updated = FALSE;
|
Updated = FALSE;
|
||||||
|
|
||||||
|
@ -32,7 +32,7 @@ IsValidQuestionFlags (
|
|||||||
IN UINT8 Flags
|
IN UINT8 Flags
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return (Flags & (~QUESTION_FLAGS)) ? FALSE : TRUE;
|
return (BOOLEAN)((Flags & (~QUESTION_FLAGS)) ? FALSE : TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC
|
STATIC
|
||||||
@ -41,7 +41,7 @@ IsValidValueType (
|
|||||||
IN UINT8 Type
|
IN UINT8 Type
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return (Type <= EFI_IFR_TYPE_OTHER) ? TRUE : FALSE;
|
return (BOOLEAN)((Type <= EFI_IFR_TYPE_OTHER) ? TRUE : FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
STATIC
|
STATIC
|
||||||
@ -67,7 +67,7 @@ IsValidCheckboxFlags (
|
|||||||
IN UINT8 Flags
|
IN UINT8 Flags
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
return (Flags <= EFI_IFR_CHECKBOX_DEFAULT_MFG) ? TRUE : FALSE;
|
return (BOOLEAN)((Flags <= EFI_IFR_CHECKBOX_DEFAULT_MFG) ? TRUE : FALSE);
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
@ -302,7 +302,7 @@ CreateOneOfOptionOpCode (
|
|||||||
|
|
||||||
OneOfOption.Option = OptionsList[Index].StringToken;
|
OneOfOption.Option = OptionsList[Index].StringToken;
|
||||||
OneOfOption.Value = OptionsList[Index].Value;
|
OneOfOption.Value = OptionsList[Index].Value;
|
||||||
OneOfOption.Flags = OptionsList[Index].Flags & (EFI_IFR_OPTION_DEFAULT | EFI_IFR_OPTION_DEFAULT_MFG);
|
OneOfOption.Flags = (UINT8)(OptionsList[Index].Flags & (EFI_IFR_OPTION_DEFAULT | EFI_IFR_OPTION_DEFAULT_MFG));
|
||||||
OneOfOption.Type = Type;
|
OneOfOption.Type = Type;
|
||||||
|
|
||||||
LocalBuffer = (UINT8 *) Data->Data + Data->Offset;
|
LocalBuffer = (UINT8 *) Data->Data + Data->Offset;
|
||||||
@ -360,7 +360,7 @@ CreateOneOfOpCode (
|
|||||||
EfiCopyMem (LocalBuffer, &OneOf, sizeof (EFI_IFR_ONE_OF));
|
EfiCopyMem (LocalBuffer, &OneOf, sizeof (EFI_IFR_ONE_OF));
|
||||||
Data->Offset += sizeof (EFI_IFR_ONE_OF);
|
Data->Offset += sizeof (EFI_IFR_ONE_OF);
|
||||||
|
|
||||||
CreateOneOfOptionOpCode (OptionCount, OptionsList, (OneOfFlags & EFI_IFR_NUMERIC_SIZE), Data);
|
CreateOneOfOptionOpCode (OptionCount, OptionsList, (UINT8)(OneOfFlags & EFI_IFR_NUMERIC_SIZE), Data);
|
||||||
|
|
||||||
CreateEndOpCode (Data);
|
CreateEndOpCode (Data);
|
||||||
|
|
||||||
@ -549,7 +549,7 @@ CreateNumericOpCode (
|
|||||||
Data->Offset += sizeof (EFI_IFR_NUMERIC);
|
Data->Offset += sizeof (EFI_IFR_NUMERIC);
|
||||||
|
|
||||||
DefaultValue.u64 = Default;
|
DefaultValue.u64 = Default;
|
||||||
Status = CreateDefaultOpCode (&DefaultValue, (NumericFlags & EFI_IFR_NUMERIC_SIZE), Data);
|
Status = CreateDefaultOpCode (&DefaultValue, (UINT8)(NumericFlags & EFI_IFR_NUMERIC_SIZE), Data);
|
||||||
if (EFI_ERROR(Status)) {
|
if (EFI_ERROR(Status)) {
|
||||||
return Status;
|
return Status;
|
||||||
}
|
}
|
||||||
|
@ -167,7 +167,7 @@ Returns:
|
|||||||
Operand >>= 1;
|
Operand >>= 1;
|
||||||
Bitpos++;
|
Bitpos++;
|
||||||
}
|
}
|
||||||
return (Bitpos - 1);
|
return (UINT8)(Bitpos - 1);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -54,7 +54,7 @@ Returns:
|
|||||||
if (((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ||
|
if (((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_PROGRESS_CODE) ||
|
||||||
((CodeType & EFI_STATUS_CODE_TYPE_MASK)== EFI_ERROR_CODE)) {
|
((CodeType & EFI_STATUS_CODE_TYPE_MASK)== EFI_ERROR_CODE)) {
|
||||||
*PostCode = (UINT8) (((Value & EFI_STATUS_CODE_CLASS_MASK) >> 24) << 5);
|
*PostCode = (UINT8) (((Value & EFI_STATUS_CODE_CLASS_MASK) >> 24) << 5);
|
||||||
*PostCode |= (UINT8) (((Value & EFI_STATUS_CODE_SUBCLASS_MASK) >> 16) & 0x1f);
|
*PostCode = (UINT8)(*PostCode | (((Value & EFI_STATUS_CODE_SUBCLASS_MASK) >> 16) & 0x1f));
|
||||||
return TRUE;
|
return TRUE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +196,8 @@ Returns:
|
|||||||
// Make sure it will all fit in the passed in buffer
|
// Make sure it will all fit in the passed in buffer
|
||||||
//
|
//
|
||||||
TotalSize = sizeof (EFI_STATUS_CODE_DATA) + sizeof (EFI_DEBUG_ASSERT_DATA);
|
TotalSize = sizeof (EFI_STATUS_CODE_DATA) + sizeof (EFI_DEBUG_ASSERT_DATA);
|
||||||
TotalSize += EfiAsciiStrLen (Filename) + EfiAsciiStrLen (Description);
|
TotalSize += EfiAsciiStrLen (Filename);
|
||||||
|
TotalSize += EfiAsciiStrLen (Description);
|
||||||
if (TotalSize > BufferSize) {
|
if (TotalSize > BufferSize) {
|
||||||
return EFI_BUFFER_TOO_SMALL;
|
return EFI_BUFFER_TOO_SMALL;
|
||||||
}
|
}
|
||||||
|
@ -593,7 +593,7 @@ HexStringToBuf (
|
|||||||
} else {
|
} else {
|
||||||
Byte = Buf[Idx / 2];
|
Byte = Buf[Idx / 2];
|
||||||
Byte &= 0x0F;
|
Byte &= 0x0F;
|
||||||
Byte |= Digit << 4;
|
Byte = (UINT8)(Byte | (Digit << 4));
|
||||||
}
|
}
|
||||||
|
|
||||||
Buf[Idx / 2] = Byte;
|
Buf[Idx / 2] = Byte;
|
||||||
@ -749,9 +749,11 @@ Returns:
|
|||||||
Sub = StrCharSet;
|
Sub = StrCharSet;
|
||||||
|
|
||||||
while ((*String != L'\0') && (*StrCharSet != L'\0')) {
|
while ((*String != L'\0') && (*StrCharSet != L'\0')) {
|
||||||
if (*String++ != *StrCharSet++) {
|
if (*String++ != *StrCharSet) {
|
||||||
String = ++Src;
|
String = ++Src;
|
||||||
StrCharSet = Sub;
|
StrCharSet = Sub;
|
||||||
|
} else {
|
||||||
|
StrCharSet++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (*StrCharSet == L'\0') {
|
if (*StrCharSet == L'\0') {
|
||||||
@ -788,9 +790,11 @@ Returns:
|
|||||||
Sub = StrCharSet;
|
Sub = StrCharSet;
|
||||||
|
|
||||||
while ((*String != '\0') && (*StrCharSet != '\0')) {
|
while ((*String != '\0') && (*StrCharSet != '\0')) {
|
||||||
if (*String++ != *StrCharSet++) {
|
if (*String++ != *StrCharSet) {
|
||||||
String = ++Src;
|
String = ++Src;
|
||||||
StrCharSet = Sub;
|
StrCharSet = Sub;
|
||||||
|
} else {
|
||||||
|
StrCharSet++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (*StrCharSet == '\0') {
|
if (*StrCharSet == '\0') {
|
||||||
|
@ -762,8 +762,6 @@ Returns: (VOID)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return ;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
EFI_STATUS
|
EFI_STATUS
|
||||||
|
Loading…
x
Reference in New Issue
Block a user