Skip to content
Snippets Groups Projects

vkd3d-shader/tpf: Return unsigned int from hlsl_sm4_register_from_semantic().

Merged Elizabeth Figura requested to merge zfigura/vkd3d:pr5 into master
  1. Apr 21, 2023
    • Elizabeth Figura's avatar
      vkd3d-shader/tpf: Return unsigned int from hlsl_sm4_register_from_semantic(). · b46df551
      Elizabeth Figura authored and Alexandre Julliard's avatar Alexandre Julliard committed
      Fix a compile warning:
      
      ../vkd3d/libs/vkd3d-shader/hlsl_codegen.c: In function 'allocate_semantic_register':
      ../vkd3d/libs/vkd3d-shader/hlsl_codegen.c:2947:85: error: passing argument 4 of 'hlsl_sm4_register_from_semantic' from incompatible pointer type [-Werror=incompatible-pointer-types]
       2947 |         if ((builtin = hlsl_sm4_register_from_semantic(ctx, &var->semantic, output, &type, NULL, &has_idx)))
            |                                                                                     ^~~~~
            |                                                                                     |
            |                                                                                     unsigned int *
      In file included from ../vkd3d/libs/vkd3d-shader/hlsl_codegen.c:21:
      ../vkd3d/libs/vkd3d-shader/hlsl.h:1171:52: note: expected 'enum vkd3d_sm4_register_type *' but argument is of type 'unsigned int *'
       1171 |         bool output, enum vkd3d_sm4_register_type *type, enum vkd3d_sm4_swizzle_type *swizzle_type, bool *has_idx);
            |                      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~
      b46df551
Loading