MdeModulePkg NvmExpressDxe: Fix VS2010 build error

Potentially uninitialized 'Status' might be returned in functions
NvmeCreateIoCompletionQueue() and NvmeCreateIoSubmissionQueue() in file
NvmExpressHci.c.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Hao Wu <hao.a.wu@intel.com>
Reviewed-by: Qiu Shumin <shumin.qiu@intel.com>
Reviewed-by: Feng Tian <feng.tian@intel.com>
This commit is contained in:
Hao Wu 2016-05-25 10:00:08 +08:00
parent 855743f717
commit 6b571c4d8c
1 changed files with 4 additions and 0 deletions

View File

@ -684,6 +684,8 @@ NvmeCreateIoCompletionQueue (
NVME_ADMIN_CRIOCQ CrIoCq;
UINT32 Index;
Status = EFI_SUCCESS;
for (Index = 1; Index < NVME_MAX_QUEUES; Index++) {
ZeroMem (&CommandPacket, sizeof(EFI_NVM_EXPRESS_PASS_THRU_COMMAND_PACKET));
ZeroMem (&Command, sizeof(EFI_NVM_EXPRESS_COMMAND));
@ -740,6 +742,8 @@ NvmeCreateIoSubmissionQueue (
NVME_ADMIN_CRIOSQ CrIoSq;
UINT32 Index;
Status = EFI_SUCCESS;
for (Index = 1; Index < NVME_MAX_QUEUES; Index++) {
ZeroMem (&CommandPacket, sizeof(EFI_NVM_EXPRESS_PASS_THRU_COMMAND_PACKET));
ZeroMem (&Command, sizeof(EFI_NVM_EXPRESS_COMMAND));