[edk2-devel] [edk2-platforms Patch V3 08/12] Vlv2TbltDevicePkg/PlatformDxe: Add missing #if

Michael D Kinney michael.d.kinney at intel.com
Mon Jul 22 22:58:55 UTC 2019


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.sun at intel.com>
Cc: Yi Qian <yi.qian at intel.com>
Cc: Gary Lin <glin at suse.com>
Signed-off-by: Michael D Kinney <michael.d.kinney at 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/1813853
Mute #if: https://groups.io/mk?hashtag=if&subid=3943202
Group Owner: devel+owner at edk2.groups.io
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [edk2-devel-archive at redhat.com]
-=-=-=-=-=-=-=-=-=-=-=-




More information about the edk2-devel-archive mailing list