summaryrefslogtreecommitdiffstats
path: root/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
diff options
context:
space:
mode:
authorLiming Gao <gaoliming@byosoft.com.cn>2021-03-15 10:55:47 +0800
committermergify[bot] <37929162+mergify[bot]@users.noreply.github.com>2021-03-25 01:54:46 +0000
commitaa75965349875f8c68b0c43b55b0c5e4799c1289 (patch)
tree327881f55b04e3aa4a2563b500fc0f3de0939a19 /MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
parentf037af6ecbc3b55042c998a59ed8df8548e64b99 (diff)
downloadedk2-aa75965349875f8c68b0c43b55b0c5e4799c1289.tar.gz
edk2-aa75965349875f8c68b0c43b55b0c5e4799c1289.tar.bz2
edk2-aa75965349875f8c68b0c43b55b0c5e4799c1289.zip
MdeModulePkg: Initialize local variable value before they are used
BZ: https://bugzilla.tianocore.org/show_bug.cgi?id=3228 This change is to fix the false compiler error on GCC49 release build. Cc: Jian J Wang <jian.j.wang@intel.com> Cc: Hao A Wu <hao.a.wu@intel.com> Signed-off-by: Liming Gao <gaoliming@byosoft.com.cn> Reviewed-by: Hao A Wu <hao.a.wu@intel.com> Reviewed-by: Laszlo Ersek <lersek@redhat.com>
Diffstat (limited to 'MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c')
-rw-r--r--MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
index e99a812a44..1053695b3b 100644
--- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
+++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c
@@ -1128,6 +1128,11 @@ AhciDmaTransfer (
}
//
+ // Set Status to suppress incorrect compiler/analyzer warnings
+ //
+ Status = EFI_SUCCESS;
+
+ //
// DMA buffer allocation. Needs to be done only once for both sync and async
// DMA transfers irrespective of number of retries.
//