diff options
author | Star Zeng <star.zeng@intel.com> | 2018-04-08 09:27:35 +0800 |
---|---|---|
committer | Hao Wu <hao.a.wu@intel.com> | 2018-08-14 20:24:25 +0800 |
commit | d19d3e1690e83f54265d8554a89b8cdaecc9e916 (patch) | |
tree | 41d5c216bbcfc514b0c822ec9e37d6ff78de18dc | |
parent | 1659be44cedf27e46f60406a8afeee88fe97a7cf (diff) | |
download | edk2-d19d3e1690e83f54265d8554a89b8cdaecc9e916.tar.gz edk2-d19d3e1690e83f54265d8554a89b8cdaecc9e916.tar.bz2 edk2-d19d3e1690e83f54265d8554a89b8cdaecc9e916.zip |
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>
Reviewed-by: Dandan Bi <dandan.bi@intel.com>
(cherry picked from commit e037e88cd81d4ac63dd627719c87c305bf0b439e)
-rw-r--r-- | MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c index 31ddf9c3bb..e17e98230b 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
|