[PATCH 5/6] Workaround GCC11 complaining about sizeof(a)/sizeof(b) constructs when it's

Eric Pouech eric.pouech at gmail.com
Wed Sep 29 02:21:40 CDT 2021


to be more precise,
gcc11 complains with:
/home/eric/work/wine/dlls/d3dx9_36/tests/effect.c: In function
'test_effect_parameter_value_GetMatrixPointerArray':
/home/eric/work/wine/dlls/d3dx9_36/tests/effect.c:1478:52: warning:
expression does not compute the number of elements in this array; element
type is 'FLOAT' {aka 'float'}, not 'D3DXMATRIX' {aka 'struct _D3DMATRIX'}
[-Wsizeof-array-div]
 1478 |     D3DXMATRIX
*matrix_pointer_array[sizeof(fvalue)/sizeof(D3DXMATRIX)];
      |                                                    ^
/home/eric/work/wine/dlls/d3dx9_36/tests/effect.c:1478:52: note: add
parentheses around the second 'sizeof' to silence this warning
/home/eric/work/wine/dlls/d3dx9_36/tests/effect.c:1477:11: note: array
'fvalue' declared here
 1477 |     FLOAT fvalue[EFFECT_PARAMETER_VALUE_ARRAY_SIZE];
      |           ^~~~~~

so the patch mainly silences GCC11 by following gcc advice of adding
parenthesis
A+

On Tue, 28 Sept 2021 at 23:03, Marvin <testbot at winehq.org> wrote:

> Thank you for your contribution to Wine!
>
> This is an automated notification to let you know that your patch has
> been reviewed and its status set to "Assigned".
>
> This means that the patch has been assigned to a reviewer. If the
> reviewer signs off on the patch, it will be committed, otherwise
> you'll receive advice on how to improve it. If you don't hear anything
> after a couple of weeks, please resend the patch.
>


-- 
-- 
Eric Pouech
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20210929/807bbfec/attachment.htm>


More information about the wine-devel mailing list