Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-cw
Commits
0dd6bc9d
Commit
0dd6bc9d
authored
Feb 01, 2022
by
Rémi Bernon
Committed by
Alexandre Julliard
Feb 01, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
hidclass.sys: Fix printf format warnings with long types.
Signed-off-by:
Rémi Bernon
<
rbernon@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
a6cbdb7d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
16 deletions
+15
-16
Makefile.in
dlls/hidclass.sys/Makefile.in
+0
-1
device.c
dlls/hidclass.sys/device.c
+5
-5
pnp.c
dlls/hidclass.sys/pnp.c
+10
-10
No files found.
dlls/hidclass.sys/Makefile.in
View file @
0dd6bc9d
EXTRADEFS
=
-DWINE_NO_LONG_TYPES
MODULE
=
hidclass.sys
IMPORTLIB
=
hidclass
IMPORTS
=
hal ntoskrnl user32 hidparse
...
...
dlls/hidclass.sys/device.c
View file @
0dd6bc9d
...
...
@@ -351,7 +351,7 @@ static DWORD CALLBACK hid_device_thread(void *args)
if
(
!
(
report
=
find_report_with_type_and_id
(
ext
,
HidP_Input
,
buffer
[
0
],
FALSE
)))
WARN
(
"dropping unknown input id %u
\n
"
,
buffer
[
0
]
);
else
if
(
!
polled
&&
io
.
Information
<
report
->
InputLength
)
WARN
(
"dropping short report, len %
u expected %u
\n
"
,
(
ULONG
)
io
.
Information
,
report
->
InputLength
);
WARN
(
"dropping short report, len %
Iu expected %u
\n
"
,
io
.
Information
,
report
->
InputLength
);
else
{
packet
->
reportId
=
buffer
[
0
];
...
...
@@ -364,7 +364,7 @@ static DWORD CALLBACK hid_device_thread(void *args)
res
=
WaitForSingleObject
(
ext
->
u
.
pdo
.
halt_event
,
polled
?
ext
->
u
.
pdo
.
poll_interval
:
0
);
}
while
(
res
==
WAIT_TIMEOUT
);
TRACE
(
"device thread exiting, res %#x
\n
"
,
res
);
TRACE
(
"device thread exiting, res %#lx
\n
"
,
res
);
return
1
;
}
...
...
@@ -561,7 +561,7 @@ NTSTATUS WINAPI pdo_ioctl(DEVICE_OBJECT *device, IRP *irp)
irp
->
IoStatus
.
Information
=
0
;
TRACE
(
"device %p ioctl(%x)
\n
"
,
device
,
irpsp
->
Parameters
.
DeviceIoControl
.
IoControlCode
);
TRACE
(
"device %p code %#lx
\n
"
,
device
,
irpsp
->
Parameters
.
DeviceIoControl
.
IoControlCode
);
KeAcquireSpinLock
(
&
ext
->
u
.
pdo
.
lock
,
&
irql
);
removed
=
ext
->
u
.
pdo
.
removed
;
...
...
@@ -661,8 +661,8 @@ NTSTATUS WINAPI pdo_ioctl(DEVICE_OBJECT *device, IRP *irp)
default:
{
ULONG
code
=
irpsp
->
Parameters
.
DeviceIoControl
.
IoControlCode
;
FIXME
(
"Unsupported ioctl %x (device=%x access=%x func=%x method=%x)
\n
"
,
code
,
code
>>
16
,
(
code
>>
14
)
&
3
,
(
code
>>
2
)
&
0xfff
,
code
&
3
);
FIXME
(
"Unsupported ioctl %#lx (device=%lx access=%lx func=%lx method=%lx)
\n
"
,
code
,
code
>>
16
,
(
code
>>
14
)
&
3
,
(
code
>>
2
)
&
0xfff
,
code
&
3
);
irp
->
IoStatus
.
Status
=
STATUS_NOT_SUPPORTED
;
break
;
}
...
...
dlls/hidclass.sys/pnp.c
View file @
0dd6bc9d
...
...
@@ -143,13 +143,13 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *b
if
((
status
=
get_device_id
(
bus_pdo
,
BusQueryDeviceID
,
device_id
)))
{
ERR
(
"Failed to get PDO device id, status %#x.
\n
"
,
status
);
ERR
(
"Failed to get PDO device id, status %#lx.
\n
"
,
status
);
return
status
;
}
if
((
status
=
get_device_id
(
bus_pdo
,
BusQueryInstanceID
,
instance_id
)))
{
ERR
(
"Failed to get PDO instance id, status %#x.
\n
"
,
status
);
ERR
(
"Failed to get PDO instance id, status %#lx.
\n
"
,
status
);
return
status
;
}
...
...
@@ -159,7 +159,7 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *b
if
((
status
=
IoCreateDevice
(
driver
,
sizeof
(
*
ext
)
+
minidriver
->
minidriver
.
DeviceExtensionSize
,
NULL
,
FILE_DEVICE_BUS_EXTENDER
,
0
,
FALSE
,
&
fdo
)))
{
ERR
(
"Failed to create bus FDO, status %#x.
\n
"
,
status
);
ERR
(
"Failed to create bus FDO, status %#lx.
\n
"
,
status
);
return
status
;
}
ext
=
fdo
->
DeviceExtension
;
...
...
@@ -177,7 +177,7 @@ static NTSTATUS WINAPI driver_add_device(DRIVER_OBJECT *driver, DEVICE_OBJECT *b
status
=
minidriver
->
AddDevice
(
minidriver
->
minidriver
.
DriverObject
,
fdo
);
if
(
status
!=
STATUS_SUCCESS
)
{
ERR
(
"Minidriver AddDevice failed (%x)
\n
"
,
status
);
ERR
(
"Minidriver AddDevice failed (%lx)
\n
"
,
status
);
IoDeleteDevice
(
fdo
);
return
status
;
}
...
...
@@ -206,7 +206,7 @@ static void create_child(minidriver *minidriver, DEVICE_OBJECT *fdo)
call_minidriver
(
IOCTL_HID_GET_DEVICE_ATTRIBUTES
,
fdo
,
NULL
,
0
,
&
attr
,
sizeof
(
attr
),
&
io
);
if
(
io
.
Status
!=
STATUS_SUCCESS
)
{
ERR
(
"Minidriver failed to get attributes, status %#x.
\n
"
,
io
.
Status
);
ERR
(
"Minidriver failed to get attributes, status %#
l
x.
\n
"
,
io
.
Status
);
return
;
}
...
...
@@ -215,7 +215,7 @@ static void create_child(minidriver *minidriver, DEVICE_OBJECT *fdo)
RtlInitUnicodeString
(
&
string
,
pdo_name
);
if
((
status
=
IoCreateDevice
(
fdo
->
DriverObject
,
sizeof
(
*
pdo_ext
),
&
string
,
0
,
0
,
FALSE
,
&
child_pdo
)))
{
ERR
(
"Failed to create child PDO, status %#x.
\n
"
,
io
.
Status
);
ERR
(
"Failed to create child PDO, status %#
l
x.
\n
"
,
io
.
Status
);
return
;
}
fdo_ext
->
u
.
fdo
.
child_pdo
=
child_pdo
;
...
...
@@ -236,7 +236,7 @@ static void create_child(minidriver *minidriver, DEVICE_OBJECT *fdo)
call_minidriver
(
IOCTL_HID_GET_DEVICE_DESCRIPTOR
,
fdo
,
NULL
,
0
,
&
descriptor
,
sizeof
(
descriptor
),
&
io
);
if
(
io
.
Status
!=
STATUS_SUCCESS
)
{
ERR
(
"Cannot get Device Descriptor(%x)
\n
"
,
status
);
ERR
(
"Cannot get Device Descriptor, status %#lx
\n
"
,
status
);
IoDeleteDevice
(
child_pdo
);
return
;
}
...
...
@@ -256,7 +256,7 @@ static void create_child(minidriver *minidriver, DEVICE_OBJECT *fdo)
descriptor
.
DescriptorList
[
i
].
wReportLength
,
&
io
);
if
(
io
.
Status
!=
STATUS_SUCCESS
)
{
ERR
(
"Cannot get Report Descriptor(%x)
\n
"
,
status
);
ERR
(
"Cannot get Report Descriptor, status %#lx
\n
"
,
status
);
free
(
reportDescriptor
);
IoDeleteDevice
(
child_pdo
);
return
;
...
...
@@ -290,7 +290,7 @@ static void create_child(minidriver *minidriver, DEVICE_OBJECT *fdo)
PLUGPLAY_PROPERTY_PERSISTENT
,
DEVPROP_TYPE_UINT32
,
sizeof
(
pdo_ext
->
u
.
pdo
.
rawinput_handle
),
&
pdo_ext
->
u
.
pdo
.
rawinput_handle
)))
{
ERR
(
"Failed to set device handle property, status %x
\n
"
,
status
);
ERR
(
"Failed to set device handle property, status %#lx
\n
"
,
status
);
IoDeleteDevice
(
child_pdo
);
return
;
}
...
...
@@ -444,7 +444,7 @@ static NTSTATUS pdo_pnp(DEVICE_OBJECT *device, IRP *irp)
case
IRP_MN_START_DEVICE
:
if
((
status
=
IoRegisterDeviceInterface
(
device
,
ext
->
class_guid
,
NULL
,
&
ext
->
u
.
pdo
.
link_name
)))
{
ERR
(
"Failed to register interface, status %#x.
\n
"
,
status
);
ERR
(
"Failed to register interface, status %#lx.
\n
"
,
status
);
break
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment