Compiler warnings on Debian kfreebsd-i386

Charles Davis cdavis5x at gmail.com
Thu Aug 8 15:28:24 CDT 2013


On Aug 8, 2013, at 8:20 AM, Ken Sharp wrote:

> Some interesting, some not:
> 
> /home/ken/wine-git/dlls/iphlpapi/ipstats.c:1898:24: warning: ‘get_pid_map’ defined but not used [-Wunused-function]
> /home/ken/wine-git/dlls/iphlpapi/ipstats.c:1953:21: warning: ‘find_owning_pid’ defined but not used [-Wunused-function]
I have a patch to fix those (and another one to fix them on Mac OS), but there's a bunch of patches ahead of it in my queue. Also, the patch was designed for standard FreeBSD (it needs libprocstat), so I'm not sure how well it will work on GNU/kFreeBSD. I've attached both patches so you can test it. N.B. the Mac OS patch needs to be applied first--it was developed first, and it implements the guts of the GetExtended*Table functions that actually call those functions. Also, you'll need to run autoreconf(1) after applying: the patches contain changes to configure.ac, but not configure or include/config.h.in.

> /home/ken/wine-git/dlls/ntdll/directory.c: In function ‘wine_getdirentries’:
> /home/ken/wine-git/dlls/ntdll/directory.c:1710:5: warning: passing argument 4 of ‘getdirentries’ from incompatible pointer type [enabled by default]
> In file included from /home/ken/wine-git/dlls/ntdll/directory.c:29:0:
> /usr/include/dirent.h:313:18: note: expected ‘__off_t * __restrict__’ but argument is of type ‘long int *’
This one has to do with the actual getdirentries(2) prototype:

int getdirentries(int, char *, int, long *);

glibc's prototype is broken. It really is a 'long *', not an 'off_t *' (don't believe me? Go read the syscalls.master file in the kernel source). Or, maybe they're aware of this, and glibc's getdirentries(2) stub extends the 32-bit long (on a 32-bit system) into an off_t--in which case, we'll need a configure check for this.

Chip
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-iphlpapi-Implement-find_owning_pid-for-Mac-OS.patch
Type: application/octet-stream
Size: 5718 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20130808/9d7699b6/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-iphlpapi-Implement-find_owning_pid-on-FreeBSD.patch
Type: application/octet-stream
Size: 4283 bytes
Desc: not available
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20130808/9d7699b6/attachment-0003.obj>


More information about the wine-devel mailing list