summaryrefslogtreecommitdiffstats
path: root/device/hid/hid_report_descriptor.h
diff options
context:
space:
mode:
authorpkasting <pkasting@chromium.org>2014-10-17 19:13:01 -0700
committerCommit bot <commit-bot@chromium.org>2014-10-18 02:13:24 +0000
commit4c3b672cc2c1515b7e16cb535e1cd6e69e326607 (patch)
treeec3b7a1c3da0362644ce8c9851bece97bc965002 /device/hid/hid_report_descriptor.h
parentf5c85cf69f46e8231da8d292cbae29d5241ddadf (diff)
downloadchromium_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.h6
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_;