Matteo Bruni (@Mystral) commented about dlls/d3dx9_36/tests/surface.c:
+ for (i = 0; i < ARRAY_SIZE(tests); ++i) + { + const uint32_t src_pitch = get_bpp_for_d3dformat(tests[i].src_format) * tests[i].src_rect.right; + unsigned int mismatch_count = 0; + + winetest_push_context("Test %u", i); + + hr = D3DXLoadSurfaceFromMemory(surf, NULL, NULL, tests[i].src_data, tests[i].src_format, + src_pitch, tests[i].src_palette, &tests[i].src_rect, D3DX_FILTER_NONE, tests[i].color_key); + ok(hr == D3D_OK, "Unexpected hr %#lx.\n", hr); + + IDirect3DSurface9_LockRect(surf, &lock_rect, NULL, D3DLOCK_READONLY); + for (y = 0; y < 4; ++y) + { + const uint8_t *dst_expected_row = ((uint8_t *)tests[i].expected_dst_data) + (16 * y); + const uint8_t *dst_row = ((uint8_t *)lock_rect.pBits) + (lock_rect.Pitch * y); Not really an issue but ideally the cast should be to `(const uint8_t *)`.
Also bikeshedding but, that 16 could be "spelled out" as `4 * 4`, or `sizeof(uint32_t) * 4` or such. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7711#note_99957