From 33fc7bf316fd35aafffa9025a78fd09ac670448c Mon Sep 17 00:00:00 2001 From: Katayama Hirofumi MZ Date: Thu, 30 Aug 2018 07:50:06 +0900 Subject: [PATCH] [STORAHCI] Fix MSVC "uninitialized local variable" error (C4700) (#828) See also PR #821. --- drivers/storage/storahci/storahci.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/storage/storahci/storahci.c b/drivers/storage/storahci/storahci.c index 54931ac6ff1..c674b2b7af4 100644 --- a/drivers/storage/storahci/storahci.c +++ b/drivers/storage/storahci/storahci.c @@ -1480,6 +1480,12 @@ AhciProcessSrb ( * @param PortExtension * */ + +#ifdef _MSC_VER // avoid MSVC C4700 + #pragma warning(push) + #pragma warning(disable: 4700) +#endif + VOID AhciActivatePort ( __in PAHCI_PORT_EXTENSION PortExtension @@ -1529,6 +1535,10 @@ AhciActivatePort ( return; }// -- AhciActivatePort(); +#ifdef _MSC_VER // avoid MSVC C4700 + #pragma warning(pop) +#endif + /** * @name AhciProcessIO * @implemented