Matteo Bruni (@Mystral) commented about dlls/dsound/tests/dsound.c:
+ "DirectSoundCreate() failed: %08lx\n",rc); + if (rc!=DS_OK) + return; + + rc=DirectSoundCreate(NULL,&dso2,NULL); + ok(rc==DS_OK||rc==DSERR_NODRIVER||rc==DSERR_ALLOCATED||rc==E_FAIL, + "DirectSoundCreate() failed: %08lx\n",rc); + if (rc!=DS_OK) { + IDirectSound_Release(dso1); + return; + } + + rc=IDirectSound_SetCooperativeLevel(dso1,get_hwnd(),DSSCL_PRIORITY); + ok(rc==DS_OK,"IDirectSound_SetCooperativeLevel(dso1) failed: %08lx\n",rc); + if (rc!=DS_OK) + goto EXIT; It doesn't look like this can legitimately fail (i.e. we leave the test only after flagging a test failure). The `if` should go.
I know that there are existing tests that do exactly the same, but those should be ideally fixed and we don't want to add more of this bad pattern. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/10735#note_137955