mirror of
https://github.com/reactos/reactos.git
synced 2026-06-02 09:20:43 +08:00
[D3DX9_WINETEST] Disable GCC 13 sizeof-array-div warning
C:/ReactOS/reactos/modules/rostests/winetests/d3dx9_36/mesh.c: In function 'test_update_semantics':
C:/ReactOS/reactos/modules/rostests/winetests/d3dx9_36/mesh.c:4837:34: error: expression does not compute the number of elements in this array; element type is 'D3DVERTEXELEMENT9' {aka 'struct _D3DVERTEXELEMENT9'}, not 'int' [-Werror=sizeof-array-div]
4837 | for (i = sizeof(declaration0)/sizeof(*decl_mem); i < sizeof(declaration)/sizeof(*decl_mem); i++)
| ^
C:/ReactOS/reactos/modules/rostests/winetests/d3dx9_36/mesh.c:4837:42: note: add parentheses around '*decl_mem' to silence this warning
4837 | for (i = sizeof(declaration0)/sizeof(*decl_mem); i < sizeof(declaration)/sizeof(*decl_mem); i++)
| ~^~~~~~~~~~
| ( )
C:/ReactOS/reactos/modules/rostests/winetests/d3dx9_36/mesh.c:4667:23: note: array 'declaration0' declared here
4667 | D3DVERTEXELEMENT9 declaration0[] =
| ^~~~~~~~~~~~
This commit is contained in:
@@ -19,6 +19,9 @@ target_compile_definitions(d3dx9_36_winetest PRIVATE USE_WINE_TODOS __WINESRC__
|
||||
if(MSVC)
|
||||
# Disable warning C4477 (printf format warnings)
|
||||
remove_target_compile_option(d3dx9_36_winetest "/we4477")
|
||||
else()
|
||||
# "expression does not compute the number of elements in this array"
|
||||
target_compile_options(d3dx9_36_winetest PRIVATE -Wno-sizeof-array-div)
|
||||
endif()
|
||||
|
||||
target_link_libraries(d3dx9_36_winetest uuid dxguid)
|
||||
|
||||
Reference in New Issue
Block a user