aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/um/wrappers/simple/src
diff options
context:
space:
mode:
authorEgor Tensin <Egor.Tensin@gmail.com>2017-06-01 05:09:07 +0300
committerEgor Tensin <Egor.Tensin@gmail.com>2017-06-01 05:09:07 +0300
commitd50564853f69136418a11124be27a69cd05cc723 (patch)
tree890c02b84c5060268a323ea74b71a3488f3a61d5 /um/wrappers/simple/src
parentum: README update (diff)
downloadwindows7-drivers-d50564853f69136418a11124be27a69cd05cc723.tar.gz
windows7-drivers-d50564853f69136418a11124be27a69cd05cc723.zip
um: fix compiler warnings
Diffstat (limited to 'um/wrappers/simple/src')
-rw-r--r--um/wrappers/simple/src/device.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/um/wrappers/simple/src/device.cpp b/um/wrappers/simple/src/device.cpp
index 2523be6..d1a0d42 100644
--- a/um/wrappers/simple/src/device.cpp
+++ b/um/wrappers/simple/src/device.cpp
@@ -23,10 +23,12 @@ namespace simple
unsigned int Device::exchange_ints(unsigned int src) const
{
+ static_assert(sizeof(exchange_ints_ctl_code) == sizeof(service::Device::Code), "CTL_CODE() must produce DWORDs");
+
unsigned int dest;
send_control_code(
- exchange_ints_ctl_code,
+ static_cast<service::Device::Code>(exchange_ints_ctl_code),
&src,
sizeof(src),
&dest,