diff options
author | Egor Tensin <Egor.Tensin@gmail.com> | 2017-06-01 05:09:07 +0300 |
---|---|---|
committer | Egor Tensin <Egor.Tensin@gmail.com> | 2017-06-01 05:09:07 +0300 |
commit | d50564853f69136418a11124be27a69cd05cc723 (patch) | |
tree | 890c02b84c5060268a323ea74b71a3488f3a61d5 /um/wrappers/special/nt_namespace/src/device.cpp | |
parent | um: README update (diff) | |
download | windows7-drivers-d50564853f69136418a11124be27a69cd05cc723.tar.gz windows7-drivers-d50564853f69136418a11124be27a69cd05cc723.zip |
um: fix compiler warnings
Diffstat (limited to '')
-rw-r--r-- | um/wrappers/special/nt_namespace/src/device.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/um/wrappers/special/nt_namespace/src/device.cpp b/um/wrappers/special/nt_namespace/src/device.cpp index 1697e45..4f9021b 100644 --- a/um/wrappers/special/nt_namespace/src/device.cpp +++ b/um/wrappers/special/nt_namespace/src/device.cpp @@ -29,15 +29,17 @@ namespace nt_namespace const auto in_buf = src.c_str(); const auto in_buf_size = (src.size() + 1) * sizeof(wchar_t); + static_assert(sizeof(control_code) == sizeof(service::Device::Code), "CTL_CODE() must return DWORDs"); + const auto nbreq = get_required_output_size( - control_code, + static_cast<service::Device::Code>(control_code), in_buf, in_buf_size); std::vector<unsigned char> output(nbreq); send_control_code( - control_code, + static_cast<service::Device::Code>(control_code), in_buf, in_buf_size, output.data(), |