[PATCH v4 0/3] MR227: riched20: Fix for #52752 (use IViewObject implementation)

Huw Davies (@huw) wine at gitlab.winehq.org
Mon Jun 13 07:34:50 CDT 2022


Huw Davies (@huw) commented about dlls/riched20/tests/richole.c:
>    ok(hr == S_OK, "Got hr %#lx.\n", hr);
>    todo_wine ok(result == 0xfffc, "Got char: %lc\n", (WCHAR)result);
>  
> +  hr = testoleobj_Create(&testobj);
> +  ok(hr == S_OK, "testoleobj_Create got hr %#lx.\n", hr);
> +  testobj->extent.cx = 800;
> +  testobj->extent.cy = 400;
This is causing a compiler warning here:
```
dlls/riched20/tests/richole.c: In function ‘subtest_InsertObject’:
dlls/riched20/tests/richole.c:4171:22: warning: ‘testobj’ may be used uninitialized in this function [-Wmaybe-uninitialized]
 4171 |   testobj->extent.cy = 400;
      |   ~~~~~~~~~~~~~~~~~~~^~~~~
```
It's probably easiest to fix by moving the assignment of `*objptr` to just after the `calloc()` in `testoleobj_Create()`.

-- 
https://gitlab.winehq.org/wine/wine/-/merge_requests/227#note_1945



More information about the wine-devel mailing list