http://bugs.winehq.org/show_bug.cgi?id=17107
Summary: compiler warnings in server/fd.c on NetBSD Product: Wine Version: 1.1.13 Platform: PC OS/Version: NetBSD Status: NEW Keywords: download, source Severity: enhancement Priority: P2 Component: wineserver AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com
fd.c: In function 'set_fd_epoll_events': fd.c:580: warning: assignment makes integer from pointer without a cast fd.c:581: warning: assignment makes integer from pointer without a cast
Only appears on NetBSD, but not OpenBSD/FreeBSD. Vincent Povirk helped me investigate on IRC, and looks like the problem is that on FreeBSD, in /usr/include/sys/event.h you've got: struct kevent { uintptr_t ident; /* identifier for this event */ short filter; /* filter for event */ u_short flags; u_int fflags; intptr_t data; void *udata; /* opaque user data identifier */ };
But on NetBSD:
struct kevent { uintptr_t ident; /* identifier for this event */ uint32_t filter; /* filter for event */ uint32_t flags; /* action flags for kqueue */ uint32_t fflags; /* filter flag value */ int64_t data; /* filter data value */ intptr_t udata; /* opaque user data identifier */ };
Note the difference in udata 'void *' vs 'intptr_t'.
Relevant lines from the code: EV_SET( &ev[0], fd->unix_fd, EVFILT_READ, 0, NOTE_LOWAT, 1, (void *)user ); EV_SET( &ev[1], fd->unix_fd, EVFILT_WRITE, 0, NOTE_LOWAT, 1, (void *)user );
removing (void *) or changing it to intptr_t fixes the warning, but doesn't seem a proper fix. Probably needs an ifdef or typedef, but I'll leave that for someone else to decide.
http://bugs.winehq.org/show_bug.cgi?id=17107
--- Comment #1 from Austin English austinenglish@gmail.com 2009-05-28 22:12:24 --- Still present in git.
http://bugs.winehq.org/show_bug.cgi?id=17107
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de
--- Comment #2 from André H. nerv@dawncrow.de 2011-10-16 10:31:40 CDT --- http://www.winehq.org/pipermail/wine-patches/2011-October/107923.html
http://bugs.winehq.org/show_bug.cgi?id=17107
Jerome Leclanche adys.wh@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch CC| |adys.wh@gmail.com
--- Comment #3 from Jerome Leclanche adys.wh@gmail.com 2011-11-07 15:19:49 CST --- Patch was not committed (pending).
http://bugs.winehq.org/show_bug.cgi?id=17107
--- Comment #4 from André H. nerv@dawncrow.de 2013-06-04 15:52:51 CDT --- (In reply to comment #3)
Patch was not committed (pending).
yeah, this needs a better solution, but NetBSD isn't really supported atm anyway
https://bugs.winehq.org/show_bug.cgi?id=17107
joaopa jeremielapuree@yahoo.fr changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |jeremielapuree@yahoo.fr
--- Comment #5 from joaopa jeremielapuree@yahoo.fr --- Does the bug still occur with current wine (3.21)?