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@gmail.com
From: Eric Pouech eric.pouech@gmail.com
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@gmail.com --- dlls/d3dx9_36/tests/effect.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/d3dx9_36/tests/effect.c b/dlls/d3dx9_36/tests/effect.c index 18a44ca6a60..b5231d10795 100644 --- a/dlls/d3dx9_36/tests/effect.c +++ b/dlls/d3dx9_36/tests/effect.c @@ -1835,7 +1835,7 @@ static void test_effect_parameter_value(IDirect3DDevice9 *device) DWORD input_value[EFFECT_PARAMETER_VALUE_ARRAY_SIZE]; DWORD expected_value[EFFECT_PARAMETER_VALUE_ARRAY_SIZE]; UINT l, n, m, element; - const D3DXMATRIX *matrix_pointer_array[sizeof(input_value)/sizeof(D3DXMATRIX)]; + const D3DXMATRIX *matrix_pointer_array[sizeof(input_value)/(sizeof(D3DXMATRIX))];
parameter = effect->lpVtbl->GetParameterByName(effect, NULL, res_full_name); ok(parameter != NULL, "%u - %s: GetParameterByName failed\n", i, res_full_name);
Patch is okay but please fix the subject prefix to "d3dx9:".
For the records, I get the same warning on GCC 11.3.0 p5