* [PATCH] MdeModulePkg/Gcd: Suppress incorrect compiler/analyzer warnings
@ 2018-04-08 1:28 Star Zeng
2018-04-08 1:48 ` Bi, Dandan
0 siblings, 1 reply; 2+ messages in thread
From: Star Zeng @ 2018-04-08 1:28 UTC (permalink / raw)
To: edk2-devel; +Cc: Star Zeng, Dandan Bi, Jiewen Yao, Michael D Kinney
It is caused by 0c9f2cb10b7ddec56a3440e77219fd3ab1725e5c
and false positive.
Initialize CpuArchAttributes to suppress incorrect
compiler/analyzer warnings.
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
index 31ddf9c3bb51..e17e98230b79 100644
--- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
+++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
@@ -3,7 +3,7 @@
The GCD services are used to manage the memory and I/O regions that
are accessible to the CPU that is executing the DXE core.
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials
are licensed and made available under the terms and conditions of the BSD License
which accompanies this distribution. The full text of the license may be found at
@@ -866,6 +866,10 @@ CoreConvertSpace (
}
ASSERT (TopEntry != NULL && BottomEntry != NULL);
+ //
+ // Initialize CpuArchAttributes to suppress incorrect compiler/analyzer warnings.
+ //
+ CpuArchAttributes = 0;
if (Operation == GCD_SET_ATTRIBUTES_MEMORY_OPERATION) {
//
// Call CPU Arch Protocol to attempt to set attributes on the range
--
2.7.0.windows.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] MdeModulePkg/Gcd: Suppress incorrect compiler/analyzer warnings
2018-04-08 1:28 [PATCH] MdeModulePkg/Gcd: Suppress incorrect compiler/analyzer warnings Star Zeng
@ 2018-04-08 1:48 ` Bi, Dandan
0 siblings, 0 replies; 2+ messages in thread
From: Bi, Dandan @ 2018-04-08 1:48 UTC (permalink / raw)
To: Zeng, Star, edk2-devel@lists.01.org; +Cc: Yao, Jiewen, Kinney, Michael D
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
Thanks,
Dandan
-----Original Message-----
From: Zeng, Star
Sent: Sunday, April 8, 2018 9:29 AM
To: edk2-devel@lists.01.org
Cc: Zeng, Star <star.zeng@intel.com>; Bi, Dandan <dandan.bi@intel.com>; Yao, Jiewen <jiewen.yao@intel.com>; Kinney, Michael D <michael.d.kinney@intel.com>
Subject: [PATCH] MdeModulePkg/Gcd: Suppress incorrect compiler/analyzer warnings
It is caused by 0c9f2cb10b7ddec56a3440e77219fd3ab1725e5c
and false positive.
Initialize CpuArchAttributes to suppress incorrect compiler/analyzer warnings.
Cc: Dandan Bi <dandan.bi@intel.com>
Cc: Jiewen Yao <jiewen.yao@intel.com>
Cc: Michael D Kinney <michael.d.kinney@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Star Zeng <star.zeng@intel.com>
---
MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c index 31ddf9c3bb51..e17e98230b79 100644
--- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
+++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c
@@ -3,7 +3,7 @@
The GCD services are used to manage the memory and I/O regions that
are accessible to the CPU that is executing the DXE core.
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.<BR>
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -866,6 +866,10 @@ CoreConvertSpace (
}
ASSERT (TopEntry != NULL && BottomEntry != NULL);
+ //
+ // Initialize CpuArchAttributes to suppress incorrect compiler/analyzer warnings.
+ //
+ CpuArchAttributes = 0;
if (Operation == GCD_SET_ATTRIBUTES_MEMORY_OPERATION) {
//
// Call CPU Arch Protocol to attempt to set attributes on the range
--
2.7.0.windows.1
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2018-04-08 1:48 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-04-08 1:28 [PATCH] MdeModulePkg/Gcd: Suppress incorrect compiler/analyzer warnings Star Zeng
2018-04-08 1:48 ` Bi, Dandan
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox