diff options
author | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-31 04:57:46 +0000 |
---|---|---|
committer | xli24 <xli24@6f19259b-4bc3-4df7-8a09-765794883524> | 2007-01-31 04:57:46 +0000 |
commit | 92dda53e9fe6568c9204ffd97f146710bdde3369 (patch) | |
tree | 6e555e93dae8c4ea49d503ecae1f56b3d4d2db3a /EdkModulePkg/Universal/Disk | |
parent | 86e6bb786f6f23201a2041901362e08b80681930 (diff) | |
download | edk2-platforms-92dda53e9fe6568c9204ffd97f146710bdde3369.tar.xz |
Make EdkModulePkg pass Intel IPF compiler with /W4 /WX switches, solving warning #1419.
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@2338 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'EdkModulePkg/Universal/Disk')
-rw-r--r-- | EdkModulePkg/Universal/Disk/DiskIo/Dxe/ComponentName.c | 21 | ||||
-rw-r--r-- | EdkModulePkg/Universal/Disk/DiskIo/Dxe/DiskIo.h | 73 | ||||
-rw-r--r-- | EdkModulePkg/Universal/Disk/DiskIo/Dxe/diskio.c | 52 | ||||
-rw-r--r-- | EdkModulePkg/Universal/Disk/Partition/Dxe/ComponentName.c | 21 | ||||
-rw-r--r-- | EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.c | 16 | ||||
-rw-r--r-- | EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.c | 35 | ||||
-rw-r--r-- | EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.h | 49 |
7 files changed, 138 insertions, 129 deletions
diff --git a/EdkModulePkg/Universal/Disk/DiskIo/Dxe/ComponentName.c b/EdkModulePkg/Universal/Disk/DiskIo/Dxe/ComponentName.c index 35ca70d8f8..86ed5f29f0 100644 --- a/EdkModulePkg/Universal/Disk/DiskIo/Dxe/ComponentName.c +++ b/EdkModulePkg/Universal/Disk/DiskIo/Dxe/ComponentName.c @@ -20,27 +20,6 @@ Abstract: #include "DiskIo.h"
//
-// EFI Component Name Functions
-//
-EFI_STATUS
-EFIAPI
-DiskIoComponentNameGetDriverName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN CHAR8 *Language,
- OUT CHAR16 **DriverName
- );
-
-EFI_STATUS
-EFIAPI
-DiskIoComponentNameGetControllerName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE ChildHandle OPTIONAL,
- IN CHAR8 *Language,
- OUT CHAR16 **ControllerName
- );
-
-//
// EFI Component Name Protocol
//
EFI_COMPONENT_NAME_PROTOCOL gDiskIoComponentName = {
diff --git a/EdkModulePkg/Universal/Disk/DiskIo/Dxe/DiskIo.h b/EdkModulePkg/Universal/Disk/DiskIo/Dxe/DiskIo.h index 39d87661c6..cdb67390ba 100644 --- a/EdkModulePkg/Universal/Disk/DiskIo/Dxe/DiskIo.h +++ b/EdkModulePkg/Universal/Disk/DiskIo/Dxe/DiskIo.h @@ -41,4 +41,77 @@ typedef struct { extern EFI_DRIVER_BINDING_PROTOCOL gDiskIoDriverBinding;
extern EFI_COMPONENT_NAME_PROTOCOL gDiskIoComponentName;
+//
+// Prototypes
+// Driver model protocol interface
+//
+EFI_STATUS
+EFIAPI
+DiskIoDriverBindingSupported (
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
+ );
+
+EFI_STATUS
+EFIAPI
+DiskIoDriverBindingStart (
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
+ );
+
+EFI_STATUS
+EFIAPI
+DiskIoDriverBindingStop (
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN UINTN NumberOfChildren,
+ IN EFI_HANDLE *ChildHandleBuffer
+ );
+
+//
+// Disk I/O Protocol Interface
+//
+EFI_STATUS
+EFIAPI
+DiskIoReadDisk (
+ IN EFI_DISK_IO_PROTOCOL *This,
+ IN UINT32 MediaId,
+ IN UINT64 Offset,
+ IN UINTN BufferSize,
+ OUT VOID *Buffer
+ );
+
+EFI_STATUS
+EFIAPI
+DiskIoWriteDisk (
+ IN EFI_DISK_IO_PROTOCOL *This,
+ IN UINT32 MediaId,
+ IN UINT64 Offset,
+ IN UINTN BufferSize,
+ IN VOID *Buffer
+ );
+
+//
+// EFI Component Name Functions
+//
+EFI_STATUS
+EFIAPI
+DiskIoComponentNameGetDriverName (
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN CHAR8 *Language,
+ OUT CHAR16 **DriverName
+ );
+
+EFI_STATUS
+EFIAPI
+DiskIoComponentNameGetControllerName (
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN CHAR8 *Language,
+ OUT CHAR16 **ControllerName
+ );
+
#endif
diff --git a/EdkModulePkg/Universal/Disk/DiskIo/Dxe/diskio.c b/EdkModulePkg/Universal/Disk/DiskIo/Dxe/diskio.c index d378ae3e33..62ae6d2b8a 100644 --- a/EdkModulePkg/Universal/Disk/DiskIo/Dxe/diskio.c +++ b/EdkModulePkg/Universal/Disk/DiskIo/Dxe/diskio.c @@ -32,58 +32,6 @@ Abstract: #include "DiskIo.h"
-//
-// Prototypes
-// Driver model protocol interface
-//
-EFI_STATUS
-EFIAPI
-DiskIoDriverBindingSupported (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- );
-
-EFI_STATUS
-EFIAPI
-DiskIoDriverBindingStart (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- );
-
-EFI_STATUS
-EFIAPI
-DiskIoDriverBindingStop (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN UINTN NumberOfChildren,
- IN EFI_HANDLE *ChildHandleBuffer
- );
-
-//
-// Disk I/O Protocol Interface
-//
-EFI_STATUS
-EFIAPI
-DiskIoReadDisk (
- IN EFI_DISK_IO_PROTOCOL *This,
- IN UINT32 MediaId,
- IN UINT64 Offset,
- IN UINTN BufferSize,
- OUT VOID *Buffer
- );
-
-EFI_STATUS
-EFIAPI
-DiskIoWriteDisk (
- IN EFI_DISK_IO_PROTOCOL *This,
- IN UINT32 MediaId,
- IN UINT64 Offset,
- IN UINTN BufferSize,
- IN VOID *Buffer
- );
-
EFI_DRIVER_BINDING_PROTOCOL gDiskIoDriverBinding = {
DiskIoDriverBindingSupported,
DiskIoDriverBindingStart,
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/ComponentName.c b/EdkModulePkg/Universal/Disk/Partition/Dxe/ComponentName.c index 3821690f0c..96ff648332 100644 --- a/EdkModulePkg/Universal/Disk/Partition/Dxe/ComponentName.c +++ b/EdkModulePkg/Universal/Disk/Partition/Dxe/ComponentName.c @@ -20,27 +20,6 @@ Abstract: #include "Partition.h"
//
-// EFI Component Name Functions
-//
-EFI_STATUS
-EFIAPI
-PartitionComponentNameGetDriverName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN CHAR8 *Language,
- OUT CHAR16 **DriverName
- );
-
-EFI_STATUS
-EFIAPI
-PartitionComponentNameGetControllerName (
- IN EFI_COMPONENT_NAME_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_HANDLE ChildHandle OPTIONAL,
- IN CHAR8 *Language,
- OUT CHAR16 **ControllerName
- );
-
-//
// EFI Component Name Protocol
//
EFI_COMPONENT_NAME_PROTOCOL gPartitionComponentName = {
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.c b/EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.c index 42411806f6..4b4910a813 100644 --- a/EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.c +++ b/EdkModulePkg/Universal/Disk/Partition/Dxe/Gpt.c @@ -22,6 +22,7 @@ Abstract: #include "Partition.h"
+STATIC
BOOLEAN
PartitionValidGptTable (
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,
@@ -30,6 +31,7 @@ PartitionValidGptTable ( OUT EFI_PARTITION_TABLE_HEADER *PartHeader
);
+STATIC
BOOLEAN
PartitionCheckGptEntryArrayCRC (
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,
@@ -37,6 +39,7 @@ PartitionCheckGptEntryArrayCRC ( IN EFI_PARTITION_TABLE_HEADER *PartHeader
);
+STATIC
BOOLEAN
PartitionRestoreGptTable (
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,
@@ -44,6 +47,7 @@ PartitionRestoreGptTable ( IN EFI_PARTITION_TABLE_HEADER *PartHeader
);
+STATIC
VOID
PartitionCheckGptEntry (
IN EFI_PARTITION_TABLE_HEADER *PartHeader,
@@ -51,6 +55,7 @@ PartitionCheckGptEntry ( OUT EFI_PARTITION_ENTRY_STATUS *PEntryStatus
);
+STATIC
BOOLEAN
PartitionCheckCrcAltSize (
IN UINTN MaxSize,
@@ -58,18 +63,21 @@ PartitionCheckCrcAltSize ( IN OUT EFI_TABLE_HEADER *Hdr
);
+STATIC
BOOLEAN
PartitionCheckCrc (
IN UINTN MaxSize,
IN OUT EFI_TABLE_HEADER *Hdr
);
+STATIC
VOID
PartitionSetCrcAltSize (
IN UINTN Size,
IN OUT EFI_TABLE_HEADER *Hdr
);
+STATIC
VOID
PartitionSetCrc (
IN OUT EFI_TABLE_HEADER *Hdr
@@ -320,6 +328,7 @@ Done: return GptValid;
}
+STATIC
BOOLEAN
PartitionValidGptTable (
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,
@@ -391,6 +400,7 @@ Returns: return TRUE;
}
+STATIC
BOOLEAN
PartitionCheckGptEntryArrayCRC (
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,
@@ -457,6 +467,7 @@ Returns: return (BOOLEAN) (PartHeader->PartitionEntryArrayCRC32 == Crc);
}
+STATIC
BOOLEAN
PartitionRestoreGptTable (
IN EFI_BLOCK_IO_PROTOCOL *BlockIo,
@@ -554,6 +565,7 @@ Done: return TRUE;
}
+STATIC
VOID
PartitionCheckGptEntry (
IN EFI_PARTITION_TABLE_HEADER *PartHeader,
@@ -622,6 +634,7 @@ Returns: DEBUG ((EFI_D_INFO, " End check partition entries\n"));
}
+STATIC
VOID
PartitionSetCrc (
IN OUT EFI_TABLE_HEADER *Hdr
@@ -645,6 +658,7 @@ Returns: PartitionSetCrcAltSize (Hdr->HeaderSize, Hdr);
}
+STATIC
VOID
PartitionSetCrcAltSize (
IN UINTN Size,
@@ -674,6 +688,7 @@ Returns: Hdr->CRC32 = Crc;
}
+STATIC
BOOLEAN
PartitionCheckCrc (
IN UINTN MaxSize,
@@ -699,6 +714,7 @@ Returns: return PartitionCheckCrcAltSize (MaxSize, Hdr->HeaderSize, Hdr);
}
+STATIC
BOOLEAN
PartitionCheckCrcAltSize (
IN UINTN MaxSize,
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.c b/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.c index 6a896e4e72..b4207d42b8 100644 --- a/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.c +++ b/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.c @@ -25,41 +25,6 @@ Abstract: #include "Partition.h"
//
-// Function Prototypes
-//
-EFI_STATUS
-EFIAPI
-PartitionEntryPoint (
- IN EFI_HANDLE ImageHandle,
- IN EFI_SYSTEM_TABLE *SystemTable
- );
-
-EFI_STATUS
-EFIAPI
-PartitionDriverBindingSupported (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- );
-
-EFI_STATUS
-EFIAPI
-PartitionDriverBindingStart (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
- );
-
-EFI_STATUS
-EFIAPI
-PartitionDriverBindingStop (
- IN EFI_DRIVER_BINDING_PROTOCOL *This,
- IN EFI_HANDLE ControllerHandle,
- IN UINTN NumberOfChildren,
- IN EFI_HANDLE *ChildHandleBuffer
- );
-
-//
// Partition Driver Global Variables
//
EFI_DRIVER_BINDING_PROTOCOL gPartitionDriverBinding = {
diff --git a/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.h b/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.h index ba105554e9..a52b8f5103 100644 --- a/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.h +++ b/EdkModulePkg/Universal/Disk/Partition/Dxe/Partition.h @@ -77,6 +77,55 @@ extern EFI_COMPONENT_NAME_PROTOCOL gPartitionComponentName; (((UINT8 *) a)[2] << 16) | \
(((UINT8 *) a)[3] << 24) )
+//
+// Function Prototypes
+//
+EFI_STATUS
+EFIAPI
+PartitionDriverBindingSupported (
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
+ );
+
+EFI_STATUS
+EFIAPI
+PartitionDriverBindingStart (
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath
+ );
+
+EFI_STATUS
+EFIAPI
+PartitionDriverBindingStop (
+ IN EFI_DRIVER_BINDING_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN UINTN NumberOfChildren,
+ IN EFI_HANDLE *ChildHandleBuffer
+ );
+
+//
+// EFI Component Name Functions
+//
+EFI_STATUS
+EFIAPI
+PartitionComponentNameGetDriverName (
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN CHAR8 *Language,
+ OUT CHAR16 **DriverName
+ );
+
+EFI_STATUS
+EFIAPI
+PartitionComponentNameGetControllerName (
+ IN EFI_COMPONENT_NAME_PROTOCOL *This,
+ IN EFI_HANDLE ControllerHandle,
+ IN EFI_HANDLE ChildHandle OPTIONAL,
+ IN CHAR8 *Language,
+ OUT CHAR16 **ControllerName
+ );
+
EFI_STATUS
PartitionInstallChildHandle (
IN EFI_DRIVER_BINDING_PROTOCOL *This,
|