http://bugs.winehq.org/show_bug.cgi?id=18161
Summary: unintialized variables in dlls/ntdll/cdrom.c on NetBSD 5.0 Product: Wine Version: 1.1.19 Platform: PC OS/Version: NetBSD Status: NEW Keywords: patch, source Severity: minor Priority: P2 Component: build-env AssignedTo: wine-bugs@winehq.org ReportedBy: austinenglish@gmail.com
Created an attachment (id=20627) --> (http://bugs.winehq.org/attachment.cgi?id=20627) patch
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
attached patch fixes it.
http://bugs.winehq.org/show_bug.cgi?id=18161
--- Comment #1 from Austin English austinenglish@gmail.com 2009-05-28 22:11:19 --- Still present in git.
http://bugs.winehq.org/show_bug.cgi?id=18161
Dan Kegel dank@kegel.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |dank@kegel.com Target Milestone|--- |1.2.0
--- Comment #2 from Dan Kegel dank@kegel.com 2009-10-12 14:25:06 --- patch, uninitialized variables must die -> nominating for 1.2
http://bugs.winehq.org/show_bug.cgi?id=18161
--- Comment #3 from Nikolay Sivov bunglehead@gmail.com 2009-10-12 14:36:29 --- This should be fixed at CDROM_GetInterfaceInfo().
Uninitialized value only come out if --- switch (addr.type) { case TYPE_SCSI: *port = 1; *iface = addr.addr.scsi.scbus; *device = addr.addr.scsi.target; *lun = addr.addr.scsi.lun; break; case TYPE_ATAPI: *port = 0; *iface = addr.addr.atapi.atbus; *device = addr.addr.atapi.drive; *lun = 0; break; } return 1; --- we got some third value (not TYPE_SCSI, not TYPE_ATAPI). Otherwise you shouldn't care.
http://bugs.winehq.org/show_bug.cgi?id=18161
--- Comment #4 from Austin English austinenglish@gmail.com 2009-10-12 14:56:53 --- I don't have a NetBSD install handy, but I'll try to get one soonish and investigate.
http://bugs.winehq.org/show_bug.cgi?id=18161
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.2.0 |---
--- Comment #5 from Alexandre Julliard julliard@winehq.org 2010-05-09 05:21:41 --- Not a 1.2 bug.
http://bugs.winehq.org/show_bug.cgi?id=18161
Vijay Kamuju infyquest@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |infyquest@gmail.com
--- Comment #6 from Vijay Kamuju infyquest@gmail.com 2011-09-04 10:04:29 CDT --- please check again...
http://bugs.winehq.org/show_bug.cgi?id=18161
André H. nerv@dawncrow.de changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |nerv@dawncrow.de
--- Comment #7 from André H. nerv@dawncrow.de 2012-06-12 13:42:33 CDT --- I don't see that on netbsd with gcc 4.1.3 (with or without -Wall)
http://bugs.winehq.org/show_bug.cgi?id=18161
Austin English austinenglish@gmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED
--- Comment #8 from Austin English austinenglish@gmail.com 2012-06-12 14:41:55 CDT --- (In reply to comment #7)
I don't see that on netbsd with gcc 4.1.3 (with or without -Wall)
Assuming fixed.
http://bugs.winehq.org/show_bug.cgi?id=18161
Alexandre Julliard julliard@winehq.org changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED
--- Comment #9 from Alexandre Julliard julliard@winehq.org 2012-06-22 13:30:36 CDT --- Closing bugs fixed in 1.5.7.