dinput: Remove unused variables
Robert Shearman
rob at codeweavers.com
Tue Apr 15 15:44:15 CDT 2008
Andrew Talbot wrote:
> @@ -142,13 +142,12 @@ static INT find_joystick_devices(void)
> {
> CHAR device_name[MAX_PATH], *str;
> INT len;
> - int fd;
>
> len = sprintf(device_name, "%s%d", JOYDEV_NEW, i) + 1;
> - if ((fd = open(device_name, O_RDONLY)) < 0)
> + if (open(device_name, O_RDONLY) < 0)
> {
> len = sprintf(device_name, "%s%d", JOYDEV_OLD, i) + 1;
> - if ((fd = open(device_name, O_RDONLY)) < 0) continue;
> + if (open(device_name, O_RDONLY) < 0) continue;
> }
>
> if (!(str = HeapAlloc(GetProcessHeap(), 0, len))) break;
Again, this needs to be fixed in another way as fd is being leaked.
--
Rob Shearman
More information about the wine-devel
mailing list