[D3DCOMPILER_43] Fix a MSVC-x64 warning about dxbc_init() (#1173)
[reactos.git] / dll / directx / wine / d3dcompiler_43 / utils.c
index 79f3be8..be0adbb 100644 (file)
@@ -557,7 +557,7 @@ HRESULT dxbc_add_section(struct dxbc *dxbc, DWORD tag, const char *data, DWORD d
     return S_OK;
 }
 
-HRESULT dxbc_init(struct dxbc *dxbc, UINT size)
+HRESULT dxbc_init(struct dxbc *dxbc, unsigned int size)
 {
     TRACE("dxbc %p, size %u.\n", dxbc, size);
 
@@ -1154,7 +1154,7 @@ static BOOL expr_compatible_data_types(struct hlsl_type *t1, struct hlsl_type *t
 
 static enum hlsl_base_type expr_common_base_type(enum hlsl_base_type t1, enum hlsl_base_type t2)
 {
-    enum hlsl_base_type types[] =
+    static const enum hlsl_base_type types[] =
     {
         HLSL_TYPE_BOOL,
         HLSL_TYPE_INT,
@@ -1165,7 +1165,7 @@ static enum hlsl_base_type expr_common_base_type(enum hlsl_base_type t1, enum hl
     };
     int t1_idx = -1, t2_idx = -1, i;
 
-    for (i = 0; i < sizeof(types) / sizeof(types[0]); ++i)
+    for (i = 0; i < ARRAY_SIZE(types); ++i)
     {
         /* Always convert away from HLSL_TYPE_HALF */
         if (t1 == types[i])
@@ -1943,7 +1943,7 @@ static const char *debug_node_type(enum hlsl_ir_node_type type)
         "HLSL_IR_SWIZZLE",
     };
 
-    if (type >= sizeof(names) / sizeof(names[0]))
+    if (type >= ARRAY_SIZE(names))
         return "Unexpected node type";
     return names[type];
 }