30 Jul
2025
30 Jul
'25
8:13 a.m.
Rémi Bernon (@rbernon) commented about dlls/windows.devices.enumeration/main.c:
switch (impl->status) { case DeviceWatcherStatus_Aborted: break; - case DeviceWatcherStatus_Created: hr = E_ILLEGAL_METHOD_CALL; break; - case DeviceWatcherStatus_Stopped: hr = E_ILLEGAL_METHOD_CALL; break; - case DeviceWatcherStatus_Stopping: hr = E_ILLEGAL_METHOD_CALL; break; - default: hr = E_ILLEGAL_METHOD_CALL;
I think it's cleaner to keep the explicit list of handled states rather than hiding them in the default case. The default case itself should maybe even do `assert( 0 )` instead, but it's probably not useful to change it at this point. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/8555#note_111445