[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[PATCH 2/2] Fix warnings with new compiler


  • To: <win-pv-devel@xxxxxxxxxxxxxxxxxxxx>
  • From: Owen Smith <owen.smith@xxxxxxxxxx>
  • Date: Thu, 3 Jun 2021 14:32:54 +0100
  • Authentication-results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none
  • Cc: Owen Smith <owen.smith@xxxxxxxxxx>
  • Delivery-date: Thu, 03 Jun 2021 13:33:13 +0000
  • Ironport-hdrordr: A9a23:yuHk3qoTsUFg06v1EU5fvr8aV5vtL9V00zEX/kB9WHVpm5Oj9v xGzc506farslkssSkb6K+90KnpewK6yXcH2/huAV7CZninhILMFuFfBOTZskbd8kHFh4tgPO JbAtRD4b7LfBtHZKTBkXOF+r8bqbHtms3F9ISurUuFDzsaFp2IhD0JbDpzZ3cGPDWucqBJba Z0iPA3wwaISDAyVICWF3MFV+/Mq5ngj5T9eyMLABYh9U2nkS6owKSSKWnb4j4uFxd0hZsy+2 nMlAL0oo+5teug9xPa32jPq7xLhdrazMdZDsDksLlRFtyssHftWG1SYczFgNkHmpD31L/sqq iVn/4UBbU115oWRBDvnfKi4Xi77N9k0Q6S9bbRuwqSnSW+fkNmNyKE7rgpLScwLCEbzY1BOe twrhCkX9A8N2KyoA3to9fPTB1kjUyyvD4rlvMSlWVWVc8EZKZWtpF3xjIaLH4sJlO31GkcKp ggMCgc3ocfTbqQVQGZgoCu+q3gYp0XJGbOfqEvgL3j79FmpgEy86JD/r1qop4pzuNKd3Br3Z WwDo140KxHRIsTZaJ5bd1xCveKNg==
  • Ironport-sdr: UncsZEoOavT/MlUmlPUpzRFik9KjHrBup3Ga/O/U5h7Vhz0JC/70PMgoVfpWku8wkghuFYwvIi k2v/C0uJCKdRkgUX7MlMbIiK1zcPzxxaMFfs6uFJEkmodUMrpckK+4+v6ueGkED02fRmy9B2Va ZzaB4wWSsJg3QXY20zr1vS8AwEXR8r02NthTUG3BJJdU3HMLfn8knfYsQTlT0wdRafvylZNeeF XerC+ZcuEe+xZXF4aO+Y9zVEvAen+MRiFxjqMDPt8EbVnmaNCT7HJsim+Kc/T02oxZ433GMlKA n5A=
  • List-id: Developer list for the Windows PV Drivers subproject <win-pv-devel.lists.xenproject.org>

- Disable C4061, enumerator 'value' in switch of 'type' is not explicitly
  handled by a case label
- C4063, case '3' is not a valid value for switch of enum 
'_XENBUS_STORE_PERMISSION_MASK'
  Adds XENBUS_STORE_PERM_READ_WRITE to _XENBUS_STORE_PERMISSION_MASK

Signed-off-by: Owen Smith <owen.smith@xxxxxxxxxx>
---
 include/store_interface.h      | 1 +
 src/xenbus/store.c             | 2 +-
 vs2019/xen/xen.vcxproj         | 2 +-
 vs2019/xenbus/xenbus.vcxproj   | 2 +-
 vs2019/xenfilt/xenfilt.vcxproj | 2 +-
 5 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/include/store_interface.h b/include/store_interface.h
index e1251dd..7742955 100644
--- a/include/store_interface.h
+++ b/include/store_interface.h
@@ -57,6 +57,7 @@ typedef enum _XENBUS_STORE_PERMISSION_MASK {
     XENBUS_STORE_PERM_NONE = 0,
     XENBUS_STORE_PERM_READ = 1,
     XENBUS_STORE_PERM_WRITE = 2,
+    XENBUS_STORE_PERM_READ_WRITE = 3,
 } XENBUS_STORE_PERMISSION_MASK;
 
 /*! \typedef XENBUS_STORE_PERMISSION
diff --git a/src/xenbus/store.c b/src/xenbus/store.c
index ce4c755..2fd2e19 100644
--- a/src/xenbus/store.c
+++ b/src/xenbus/store.c
@@ -1958,7 +1958,7 @@ StorePermissionToString(
         *Buffer = 'w';
         break;
 
-    case XENBUS_STORE_PERM_READ | XENBUS_STORE_PERM_WRITE:
+    case XENBUS_STORE_PERM_READ_WRITE:
         *Buffer = 'b';
         break;
 
diff --git a/vs2019/xen/xen.vcxproj b/vs2019/xen/xen.vcxproj
index 39b5bda..1bf6e1e 100644
--- a/vs2019/xen/xen.vcxproj
+++ b/vs2019/xen/xen.vcxproj
@@ -24,7 +24,7 @@
       
<PreprocessorDefinitions>PROJECT=$(ProjectName);POOL_NX_OPTIN=1;NT_PROCESSOR_GROUPS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <IntrinsicFunctions>true</IntrinsicFunctions>
       <WarningLevel>EnableAllWarnings</WarningLevel>
-      
<DisableSpecificWarnings>4146;4464;4711;4770;4548;4820;4668;4255;5045;6001;6054;26451;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      
<DisableSpecificWarnings>4061;4146;4464;4711;4770;4548;4820;4668;4255;5045;6001;6054;26451;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <EnablePREfast>true</EnablePREfast>
     </ClCompile>
diff --git a/vs2019/xenbus/xenbus.vcxproj b/vs2019/xenbus/xenbus.vcxproj
index ff40c43..85f21a8 100644
--- a/vs2019/xenbus/xenbus.vcxproj
+++ b/vs2019/xenbus/xenbus.vcxproj
@@ -24,7 +24,7 @@
       <IntrinsicFunctions>true</IntrinsicFunctions>
       
<AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen;..\..\src\common;</AdditionalIncludeDirectories>
       <WarningLevel>EnableAllWarnings</WarningLevel>
-      
<DisableSpecificWarnings>4146;4464;4711;4770;4548;4820;4668;4255;5045;6001;6054;26451;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      
<DisableSpecificWarnings>4061;4146;4464;4711;4770;4548;4820;4668;4255;5045;6001;6054;26451;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <EnablePREfast>true</EnablePREfast>
     </ClCompile>
diff --git a/vs2019/xenfilt/xenfilt.vcxproj b/vs2019/xenfilt/xenfilt.vcxproj
index b3ce00f..c797483 100644
--- a/vs2019/xenfilt/xenfilt.vcxproj
+++ b/vs2019/xenfilt/xenfilt.vcxproj
@@ -24,7 +24,7 @@
       <IntrinsicFunctions>true</IntrinsicFunctions>
       
<AdditionalIncludeDirectories>$(WindowsSdkDir)\include\km;..\..\include;..\..\include\xen;..\..\src\common;</AdditionalIncludeDirectories>
       <WarningLevel>EnableAllWarnings</WarningLevel>
-      
<DisableSpecificWarnings>4464;4711;4770;4548;4820;4668;4255;5045;6001;6054;26451;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings>
+      
<DisableSpecificWarnings>4061;4464;4711;4770;4548;4820;4668;4255;5045;6001;6054;26451;28196;30030;30029;%(DisableSpecificWarnings)</DisableSpecificWarnings>
       <MultiProcessorCompilation>true</MultiProcessorCompilation>
       <EnablePREfast>true</EnablePREfast>
     </ClCompile>
-- 
2.31.1.windows.1




 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.