Howdy,
I recently started retesting NetBSD (5.0 this time), and have filed bugs for most of the warnings. A few of them I have patches ready for, but figured I should probably get reviewed first:
First up, bug 18161: gcc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -D_NTSYSTEM_ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith -I/usr/pkg/include -I/usr/include -I/usr/X11R7/include/freetype2 -I/usr/X11R7/include -O2 -I/usr/pkg/include -I/usr/include -I/usr/X11R7/include/freetype2 -I/usr/X11R7/include -o cdrom.o cdrom.c cdrom.c: In function 'CDROM_DeviceIoControl': cdrom.c:1728: warning: 'lun' may be used uninitialized in this function cdrom.c:1728: warning: 'targetid' may be used uninitialized in this function cdrom.c:1728: warning: 'busid' may be used uninitialized in this function cdrom.c:1728: warning: 'portnum' may be used uninitialized in this function
Fixed by cdrom.txt
Bug 18162: gcc -c -I. -I. -I../../../include -I../../../include -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith -I/usr/pkg/include -I/usr/include -I/usr/X11R7/include/freetype2 -I/usr/X11R7/include -O2 -I/usr/pkg/include -I/usr/include -I/usr/X11R7/include/freetype2 -I/usr/X11R7/include -o treeview.o treeview.c treeview.c: In function 'TestCallback': treeview.c:279: warning: value computed is not used treeview.c:304: warning: value computed is not used treeview.c:313: warning: value computed is not used treeview.c:322: warning: value computed is not used treeview.c: In function 'TestExpandInvisible': treeview.c:769: warning: value computed is not used
Fixed by treeview.txt. Also tested on windows 2k, test still passes.
Bug 18165: gcc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith -I/usr/pkg/include -I/usr/include -I/usr/X11R7/include/f reetype2 -I/usr/X11R7/include -O2 -I/usr/pkg/include -I/usr/include -I/usr/X11R7/include/freetype2 -I/usr/X11R7/include -o net.o net.c net.c: In function 'netconn_init': net.c:243: warning: assignment discards qualifiers from pointer target type
Fixed by winhttp.txt. Also fixes a similar problem in wininet/netconnection.c
Bug 18166: gcc -c -I. -I. -I../../include -I../../include -D__WINESRC__ -D_NTSYSTEM_ -D_REENTRANT -fPIC -Wall -pipe -fno-strict-aliasing -Wdeclaration-after-statement -Wwrite-strings -Wpointer-arith -I/usr/pkg/include -I/usr/include -I/usr/X11R7/include/freetype2 -I/usr/X11R7/include -O2 -I/usr/pkg/include -I/usr/include -I/usr/X11R7/include/freetype2 -I/usr/X11R7/include -o directory.o directory.c directory.c: In function 'wine_getdirentries': directory.c:1289: warning: implicit declaration of function 'getdirentries'
There's a NetBSD bug here. Their version of getdirentries returns the old 32-bit inode struct dirent, while dirent.h has the new 64-bit inode struct dirent inode since NetBSD version 3.99.8. While it arguably should be fixed on their end, we already have a wrapper in there for an OS X bug...
directory.txt fixes it.
On Thursday 23 April 2009 18:46:38 Austin English wrote:
diff --git a/dlls/winhttp/net.c b/dlls/winhttp/net.c index 79e6789..3c68ee0 100644 --- a/dlls/winhttp/net.c +++ b/dlls/winhttp/net.c @@ -82,7 +82,7 @@ static CRITICAL_SECTION cs_gethostbyname = { &critsect_debug, -1, 0, 0, 0, 0 }; static void *libssl_handle; static void *libcrypto_handle;
-static SSL_METHOD *method; +static const SSL_METHOD *method; static SSL_CTX *ctx;
This generates a new warning here:
net.c: In function ‘netconn_secure_connect’: net.c:314: warning: passing argument 1 of ‘pSSL_CTX_new’ discards qualifiers from pointer target type
-Hans
On Thu, Apr 23, 2009 at 11:46:38AM -0500, Austin English wrote:
Howdy,
I recently started retesting NetBSD (5.0 this time), and have filed bugs for most of the warnings. A few of them I have patches ready for, but figured I should probably get reviewed first:
There's a NetBSD bug here. Their version of getdirentries returns the old 32-bit inode struct dirent, while dirent.h has the new 64-bit inode struct dirent inode since NetBSD version 3.99.8. While it arguably should be fixed on their end, we already have a wrapper in there for an OS X bug...
I asked a few other developers last night, getdirentries() is only present for binary compatibility with old binaries. There shouldn't be a prototype for it in dirent.h (or anywhere else).
Really the code should use opendir() etc (which are the posix functions). I've not looked at what wine is doing here, but the value returned by lseek() for directories isn't necessarily a byte offset.
David