Connor McAdams (@cmcadams) commented about dlls/setupapi/tests/devinst.c:
SetupDiDestroyDeviceInfoList(set); + + set = SetupDiCreateDeviceInfoList(NULL, NULL); + ok(set != INVALID_HANDLE_VALUE, "Failed to create device list, error %#lx.\n", GetLastError()); + + ret = SetupDiCreateDeviceInfoW(set, L"display", &GUID_DEVCLASS_DISPLAY, NULL, NULL, DICD_GENERATE_ID, &device_data); + ok(ret, "Failed to create device, error %#lx.\n", GetLastError()); + + for (i = 0; i < ARRAY_SIZE(reg_props); i++) + { + const struct reg_property *prop = ®_props[i]; + BOOL todo = prop->reg_prop != SPDRP_CLASSGUID; + DWORD size = 0, type = 0; + DEVPROPKEY key; + BYTE buf[80];
You could get rid of the initialization lines below if you did: ``` DEVPROPKEY key = { DEVPKEY_Device_DeviceDesc.fmtid, reg_props[i].reg_prop + 2 }; BYTE buf[80] = { 0 }; ``` -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8515#note_109484