Commit 0c3653bb authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt: Construct a real C++ object to test against.

This fixes GCC12 warnings about accessing a too small object. wine/dlls/msvcrt/tests/cpp.c: In function 'test_rtti': wine/dlls/msvcrt/tests/cpp.c:1036:45: warning: array subscript 2 is outside array bounds of 'void[4]' [-Warray-bounds] 1036 | ok (casted == (char*)&child_class_sig0+8, "failed cast to simple_class (%p %p)\n", casted, &child_class_sig0); | ~~~~~~~~~~~~~~~~~~~~~~~~^~ Signed-off-by: 's avatarPiotr Caban <piotr.caban@codeweavers.com> Signed-off-by: 's avatarEric Pouech <eric.pouech@gmail.com>
parent 565ce829
...@@ -943,11 +943,17 @@ static void test_rtti(void) ...@@ -943,11 +943,17 @@ static void test_rtti(void)
void *simple_class_vtbl[2] = {&simple_class_rtti.object_locator}; void *simple_class_vtbl[2] = {&simple_class_rtti.object_locator};
void *simple_class = &simple_class_vtbl[1]; void *simple_class = &simple_class_vtbl[1];
void *child_class_vtbl[2] = {&child_class_rtti.object_locator}; void *child_class_vtbl[2] = {&child_class_rtti.object_locator};
void *child_class = &child_class_vtbl[1]; struct {
void *vtbl;
char data[4];
} child_class = { &child_class_vtbl[1] };
void *simple_class_sig0_vtbl[2] = {&simple_class_sig0_rtti.object_locator}; void *simple_class_sig0_vtbl[2] = {&simple_class_sig0_rtti.object_locator};
void *simple_class_sig0 = &simple_class_sig0_vtbl[1]; void *simple_class_sig0 = &simple_class_sig0_vtbl[1];
void *child_class_sig0_vtbl[2] = {&child_class_sig0_rtti.object_locator}; void *child_class_sig0_vtbl[2] = {&child_class_sig0_rtti.object_locator};
void *child_class_sig0 = &child_class_sig0_vtbl[1]; struct {
void *vtbl;
char data[4];
} child_class_sig0 = { &child_class_sig0_vtbl[1] };
void *virtual_base_class_vtbl[2] = {&virtual_base_class_rtti.object_locator}; void *virtual_base_class_vtbl[2] = {&virtual_base_class_rtti.object_locator};
int virtual_base_class_vbtbl[2] = {0, 0x100}; int virtual_base_class_vbtbl[2] = {0, 0x100};
struct { struct {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment