Marc-André Lureau <marcandre.lur...@redhat.com> writes: > Hi > > On Fri, Aug 8, 2025 at 12:08 PM Markus Armbruster <arm...@redhat.com> wrote: > >> qemu_socket_select() and its wrapper qemu_socket_unselect() treat a >> NULL @errp as &error_warn. This is wildly inappropriate. A caller >> passing NULL specifies that errors are to be ignored. If warnings are >> wanted, the caller must pass &error_warn. >> >> I'm not familiar with the calling code, so I can't say whether it will >> work after WSAEventSelect() failure. If it doesn't, then this should >> be an error. If it does, then why bother the user with a warning that >> isn't actionable, and likely confusing? >> >> The warning goes back to commit f5fd677ae7cf (win32/socket: introduce >> qemu_socket_select() helper). Before that commit, the error was >> ignored, as indicated by passing a null @errp. Revert to that >> behavior. >> > > Yes, the potential errors before introducing the wrapper were simply > ignored. I think we should fix the users or maybe just report the warning > and drop errp from the wrapper function. wdyt?
Phil's "[RFC PATCH 0/2] system/win32: Remove unused Error argument in qemu_socket_[un]select()" does the latter. I doubt warnings are the right tool here. I just posted Subject: Abuse of warnings for unhandled errors and programming errors Message-ID: <87h5yijh3b....@pond.sub.org> [...]