Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/preshader.c:
> struct d3dx_parameters_store *parameters)
> {
> unsigned int *p;
> - unsigned int i, j, const_count;
> + unsigned int i, j, const_count, magic;
> double *dconst;
> HRESULT hr;
> unsigned int saved_word;
> unsigned int section_size;
>
> + magic = *ptr;
> +
> TRACE("Preshader version %#x.\n", *ptr & 0xffff);
It seems nice to also update the TRACE() to output the full 32-bit value.
Additional nitpick: you can probably drop the "for 2 registers" part of the patch subject.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1682#note_19493
Follow GCC recommendations for getting rid of it.
MingW/GCC 12 complains with:
/home/eric/work/wine/dlls/d3dx9_36/tests/effect.c: In function 'test_effect_parameter_value':
/home/eric/work/wine/dlls/d3dx9_36/tests/effect.c:1838:71: warning: expression does not compute the number of elements in this array; element type is 'DWORD' {aka 'long unsigned int'}, not 'D3DXMATRIX' {aka 'struct _D3DMATRIX'} [-Wsizeof-array-div]
1838 | const D3DXMATRIX *matrix_pointer_array[sizeof(input_value)/sizeof(D3DXMATRIX)];
| ^
/home/eric/work/wine/dlls/d3dx9_36/tests/effect.c:1838:71: note: add parentheses around the second 'sizeof' to silence this warning
/home/eric/work/wine/dlls/d3dx9_36/tests/effect.c:1835:19: note: array 'input_value' declared here
1835 | DWORD input_value[EFFECT_PARAMETER_VALUE_ARRAY_SIZE];
| ^~~~~~~~~~~
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
--
v3: d3dx9/tests: Avoid a GCC warning (-Wsizeof-array-div).
https://gitlab.winehq.org/wine/wine/-/merge_requests/1766
- fixes effective calling convention used in test (causing some crashes
#53536)
- properly set entries in .spec files
- only export these functions on 32bit
- always inline them on 64bit
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1794
Follow GCC recommendations for getting rid of it.
MingW/GCC 12 complains with:
/home/eric/work/wine/dlls/d3dx9_36/tests/effect.c: In function 'test_effect_parameter_value':
/home/eric/work/wine/dlls/d3dx9_36/tests/effect.c:1838:71: warning: expression does not compute the number of elements in this array; element type is 'DWORD' {aka 'long unsigned int'}, not 'D3DXMATRIX' {aka 'struct _D3DMATRIX'} [-Wsizeof-array-div]
1838 | const D3DXMATRIX *matrix_pointer_array[sizeof(input_value)/sizeof(D3DXMATRIX)];
| ^
/home/eric/work/wine/dlls/d3dx9_36/tests/effect.c:1838:71: note: add parentheses around the second 'sizeof' to silence this warning
/home/eric/work/wine/dlls/d3dx9_36/tests/effect.c:1835:19: note: array 'input_value' declared here
1835 | DWORD input_value[EFFECT_PARAMETER_VALUE_ARRAY_SIZE];
| ^~~~~~~~~~~
Signed-off-by: Eric Pouech <eric.pouech(a)gmail.com>
--
v2: d3dx9: Get rid of GCC warning.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1766