From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=missing; spf=pass (domain: intel.com, ip: 134.134.136.100, mailfrom: michael.d.kinney@intel.com) Received: from mga07.intel.com (mga07.intel.com [134.134.136.100]) by groups.io with SMTP; Mon, 22 Jul 2019 15:59:07 -0700 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga008.fm.intel.com ([10.253.24.58]) by orsmga105.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 22 Jul 2019 15:59:07 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.64,296,1559545200"; d="scan'208";a="169386499" Received: from mdkinney-mobl2.amr.corp.intel.com ([10.254.83.213]) by fmsmga008.fm.intel.com with ESMTP; 22 Jul 2019 15:59:06 -0700 From: "Michael D Kinney" To: devel@edk2.groups.io Cc: Zailiang Sun , Yi Qian , Gary Lin Subject: [edk2-platforms Patch V3 08/12] Vlv2TbltDevicePkg/PlatformDxe: Add missing #if Date: Mon, 22 Jul 2019 15:58:55 -0700 Message-Id: <20190722225859.24724-9-michael.d.kinney@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20190722225859.24724-1-michael.d.kinney@intel.com> References: <20190722225859.24724-1-michael.d.kinney@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Cc: Yi Qian Cc: Gary Lin Signed-off-by: Michael D Kinney --- 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