Add missing #if for SENSOR_INFO_VAR_SUPPORT around
the function InitializeSensorInfoVariable().  This
function is referencing 2 global variables that are
not defined, and this breaks VS2017 for undefined
global variables.

Cc: Zailiang Sun <zailiang....@intel.com>
Cc: Yi Qian <yi.q...@intel.com>
Cc: Gary Lin <g...@suse.com>
Signed-off-by: Michael D Kinney <michael.d.kin...@intel.com>
---
 Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/SensorVar.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/SensorVar.c 
b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/SensorVar.c
index 5d13e99443..6efb989bc0 100644
--- a/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/SensorVar.c
+++ b/Platform/Intel/Vlv2TbltDevicePkg/PlatformDxe/SensorVar.c
@@ -85,6 +85,7 @@ SENSOR_INFO_VAR               mSensorInfoData =
     }
 };
 
+#if defined(SENSOR_INFO_VAR_SUPPORT) && SENSOR_INFO_VAR_SUPPORT != 0
 /**
 
   Write the Sensor Info variable if it does not already exist.
@@ -109,4 +110,5 @@ InitializeSensorInfoVariable (
          &mSensorInfoData
          );
 }
+#endif
 
-- 
2.21.0.windows.1


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#44171): https://edk2.groups.io/g/devel/message/44171
Mute This Topic: https://groups.io/mt/32564738/21656
Mute #if: https://groups.io/mk?hashtag=if&subid=3846945
Group Owner: devel+ow...@edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to