From: Owen Smith Date: Thu, 12 Aug 2021 12:41:35 +0000 (+0100) Subject: Fix build with later WDKs X-Git-Url: http://xenbits.xensource.com/gitweb?a=commitdiff_plain;h=ddfd9b3c31276aa3ce38b14e6ddf9f2de28e3027;p=pvdrivers%2Fwin%2Fxenvbd.git Fix build with later WDKs - Adds alias for GetProjectInfoForReference target to version.vcxproj Later kits seemed to have renamed the build target, and will fail without this alias target. - Adds "/fd sha256" to signtool command line WDK 20344 and later require binaries signed with a SHA256 file digest, or the build outputs are deleted - Disables warning 4061 - switch statement on enum types need to have a case for all values of the enumeration Signed-off-by: Owen Smith - Cast enum types used as array indices to avoid bounds check complaint Signed-off-by: Paul Durrant --- diff --git a/src/xenvbd/driver.c b/src/xenvbd/driver.c index fc1c169..1084c30 100644 --- a/src/xenvbd/driver.c +++ b/src/xenvbd/driver.c @@ -301,7 +301,7 @@ DriverGetFeatureOverride( { BOOLEAN Present = FALSE; - if (Feature < ARRAYSIZE(Driver.FeatureOverride)) { + if ((ULONG)Feature < ARRAYSIZE(Driver.FeatureOverride)) { Present = Driver.FeatureOverride[Feature].Present; *Value = Driver.FeatureOverride[Feature].Value; } @@ -315,7 +315,7 @@ DriverGetFeatureName( IN XENVBD_FEATURE Feature ) { - return (Feature < ARRAYSIZE(Driver.FeatureOverride)) ? + return ((ULONG)Feature < ARRAYSIZE(Driver.FeatureOverride)) ? Driver.FeatureOverride[Feature].Name : NULL; } diff --git a/vs2019/package/package.vcxproj b/vs2019/package/package.vcxproj index 51c57a1..cc39738 100644 --- a/vs2019/package/package.vcxproj +++ b/vs2019/package/package.vcxproj @@ -31,6 +31,11 @@ ..\$(ProjectName)\$(ConfigurationName)\$(Platform)\ ..\$(ConfigurationName)\$(Platform)\ + + + sha256 + + ..\..\$(SolutionName)\x86 diff --git a/vs2019/version/version.vcxproj b/vs2019/version/version.vcxproj index 9d149d0..b6ec6f3 100644 --- a/vs2019/version/version.vcxproj +++ b/vs2019/version/version.vcxproj @@ -13,4 +13,10 @@ + + + + + diff --git a/vs2019/xencrsh/xencrsh.vcxproj b/vs2019/xencrsh/xencrsh.vcxproj index 6db3e1f..7aae718 100644 --- a/vs2019/xencrsh/xencrsh.vcxproj +++ b/vs2019/xencrsh/xencrsh.vcxproj @@ -24,7 +24,7 @@ PROJECT=$(ProjectName);POOL_NX_OPTIN=1;%(PreprocessorDefinitions) true EnableAllWarnings - 4464;4548;4770;4711;4820;4668;4255;5045;6001;6054;26451;28196;30030;30029;%(DisableSpecificWarnings) + 4061;4464;4548;4770;4711;4820;4668;4255;5045;6001;6054;26451;28196;30030;30029;%(DisableSpecificWarnings) true true @@ -37,6 +37,9 @@ $(DDK_LIB_PATH)/storport.lib;$(DDK_LIB_PATH)/libcntpr.lib;%(AdditionalDependencies) UseLinkTimeCodeGeneration + + sha256 + diff --git a/vs2019/xendisk/xendisk.vcxproj b/vs2019/xendisk/xendisk.vcxproj index ce4b6d3..799b86a 100644 --- a/vs2019/xendisk/xendisk.vcxproj +++ b/vs2019/xendisk/xendisk.vcxproj @@ -25,7 +25,7 @@ PROJECT=$(ProjectName);POOL_NX_OPTIN=1;%(PreprocessorDefinitions) true EnableAllWarnings - 4464;4548;4770;4711;4820;4668;4255;5045;6001;6054;26451;28196;30030;30029;%(DisableSpecificWarnings) + 4061;4464;4548;4770;4711;4820;4668;4255;5045;6001;6054;26451;28196;30030;30029;%(DisableSpecificWarnings) true true @@ -37,6 +37,9 @@ %(AdditionalDependencies) UseLinkTimeCodeGeneration + + sha256 + diff --git a/vs2019/xenvbd/xenvbd.vcxproj b/vs2019/xenvbd/xenvbd.vcxproj index 7e25d60..dcdd6d8 100644 --- a/vs2019/xenvbd/xenvbd.vcxproj +++ b/vs2019/xenvbd/xenvbd.vcxproj @@ -24,7 +24,7 @@ PROJECT=$(ProjectName);POOL_NX_OPTIN=1;%(PreprocessorDefinitions) true EnableAllWarnings - 4464;4548;4770;4711;4820;4668;4255;5045;6001;6054;26451;28160;28196;30030;30029;%(DisableSpecificWarnings) + 4061;4464;4548;4770;4711;4820;4668;4255;5045;6001;6054;26451;28160;28196;30030;30029;%(DisableSpecificWarnings) true true @@ -36,6 +36,9 @@ $(ProjectDir)..\$(ConfigurationName)\$(Platform)\xencrsh.lib;$(DDK_LIB_PATH)/storport.lib;$(DDK_LIB_PATH)/libcntpr.lib;%(AdditionalDependencies) UseLinkTimeCodeGeneration + + sha256 + diff --git a/vs2019/xenvbd_coinst/xenvbd_coinst.vcxproj b/vs2019/xenvbd_coinst/xenvbd_coinst.vcxproj index d822314..9a66f45 100644 --- a/vs2019/xenvbd_coinst/xenvbd_coinst.vcxproj +++ b/vs2019/xenvbd_coinst/xenvbd_coinst.vcxproj @@ -34,6 +34,9 @@ $(SolutionDir)..\include;%(AdditionalIncludeDirectories) + + sha256 +