Commit da071d93 authored by Piotr Caban's avatar Piotr Caban Committed by Alexandre Julliard

msvcrt/tests: Correctly declare base class to avoid a compiler warning.

parent 29533e48
......@@ -969,7 +969,11 @@ static void test_rtti(void)
void *child_class_sig0 = &child_class_sig0_vtbl[1];
void *virtual_base_class_vtbl[2] = {&virtual_base_class_rtti.object_locator};
int virtual_base_class_vbtbl[2] = {0, 0x100};
void *virtual_base_class[2] = {&virtual_base_class_vtbl[1], virtual_base_class_vbtbl};
struct {
void *virtual_base[2];
char data[0x110-sizeof(void*)];
void *vbthis;
} virtual_base_class = { {&virtual_base_class_vtbl[1], virtual_base_class_vbtbl} };
static const char* e_name = "name";
type_info *ti,*bti;
......@@ -1082,7 +1086,7 @@ static void test_rtti(void)
ok(casted == (char*)&child_class+4, "failed cast to child class (%p %p)\n", casted, &child_class);
casted = p__RTDynamicCast(&virtual_base_class, 0, &virtual_base_class_rtti.type_info[0], &virtual_base_class_rtti.type_info[1], 0);
ok(casted == (char*)&virtual_base_class+0x110+sizeof(void*), "failed cast to child class (%p %p)\n", casted, &virtual_base_class);
ok(casted == &virtual_base_class.vbthis, "failed cast to child class (%p %p)\n", casted, &virtual_base_class);
}
struct _demangle {
......
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