include: Base D3DVSD_TOKENTYPEMASK on an unsigned constant to avoid avoid shift overflows.

Gerald Pfeifer gerald at pfeifer.com
Mon Aug 10 05:35:19 CDT 2015


This avoid _72_ warnings of the kind

   ../../../include/d3d8types.h:266:44: warning: result of '7 << 29' 
  requires 33 bits to represent, but 'int' only has 32 bits

when building Wine with GCC 6.

Gerald
---
 include/d3d8types.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/d3d8types.h b/include/d3d8types.h
index 0ffa2db..9592544 100644
--- a/include/d3d8types.h
+++ b/include/d3d8types.h
@@ -263,7 +263,7 @@ typedef enum _D3DVSDT_TYPE {
 #define D3DVSD_CONSTCOUNTMASK    (0xF      << D3DVSD_CONSTCOUNTSHIFT)
 #define D3DVSD_DATALOADTYPEMASK  (0x1      << D3DVSD_DATALOADTYPESHIFT)
 #define D3DVSD_STREAMTESSMASK    (0x1      << D3DVSD_STREAMTESSSHIFT)
-#define D3DVSD_TOKENTYPEMASK     (0x7      << D3DVSD_TOKENTYPESHIFT)
+#define D3DVSD_TOKENTYPEMASK     (0x7u     << D3DVSD_TOKENTYPESHIFT)
 
 
 #define D3DVSD_MAKETOKENTYPE(TokenType) \
-- 
2.4.6



More information about the wine-patches mailing list