From 6b571c4d8c827a39a5e249d5d9db4f99aebb5d63 Mon Sep 17 00:00:00 2001 From: Hao Wu Date: Wed, 25 May 2016 10:00:08 +0800 Subject: [PATCH] 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 Reviewed-by: Qiu Shumin Reviewed-by: Feng Tian --- MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c index dcfe1e865d..4f83a92a36 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c @@ -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)); -- 2.39.2