diff options
author | pkasting <pkasting@chromium.org> | 2014-10-17 19:13:01 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-10-18 02:13:24 +0000 |
commit | 4c3b672cc2c1515b7e16cb535e1cd6e69e326607 (patch) | |
tree | ec3b7a1c3da0362644ce8c9851bece97bc965002 /device/hid/hid_report_descriptor.h | |
parent | f5c85cf69f46e8231da8d292cbae29d5241ddadf (diff) | |
download | chromium_src-4c3b672cc2c1515b7e16cb535e1cd6e69e326607.zip chromium_src-4c3b672cc2c1515b7e16cb535e1cd6e69e326607.tar.gz chromium_src-4c3b672cc2c1515b7e16cb535e1cd6e69e326607.tar.bz2 |
Fix type truncation warnings in HID code.
GetShortData() and IOHIDElementGetUsage() both return uint32s, so raise the size
of various containing types to uint32.
I tried to look in the USB HID spec to see if any of the affected fields here
were limited to e.g. <2^16, meaning that it'd be safe to just cast down to the
existing uint16s instead, but I couldn't find any limits.
BUG=81439
TEST=none
Review URL: https://codereview.chromium.org/656583003
Cr-Commit-Position: refs/heads/master@{#300201}
Diffstat (limited to 'device/hid/hid_report_descriptor.h')
-rw-r--r-- | device/hid/hid_report_descriptor.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/device/hid/hid_report_descriptor.h b/device/hid/hid_report_descriptor.h index 1719e94..61412c2 100644 --- a/device/hid/hid_report_descriptor.h +++ b/device/hid/hid_report_descriptor.h @@ -29,9 +29,9 @@ class HidReportDescriptor { // together with max report sizes void GetDetails(std::vector<HidCollectionInfo>* top_level_collections, bool* has_report_id, - uint16_t* max_input_report_size, - uint16_t* max_output_report_size, - uint16_t* max_feature_report_size); + size_t* max_input_report_size, + size_t* max_output_report_size, + size_t* max_feature_report_size); private: std::vector<linked_ptr<HidReportDescriptorItem> > items_; |