Closed Bug 1055655 Opened 10 years ago Closed 10 years ago

Fix warnings turned to errors by bug 1018288 found by mingw build.

Categories

(Core :: Hardware Abstraction Layer (HAL), defect)

x86
Other
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla35

People

(Reporter: jacek, Assigned: jacek)

References

Details

Attachments

(2 files)

It wasn't found by usual builds because MSVC doesn't have those warnings. WindowsGamepad.cpp part seems like a real bug.
Attachment #8475274 - Flags: review?(ted)
Blocks: 1018288
Comment on attachment 8475274 [details] [diff] [review]
patch

Review of attachment 8475274 [details] [diff] [review]:
-----------------------------------------------------------------

I don't think I can actually review the rest of these files, but they look okay to me FWIW.

::: hal/windows/WindowsGamepad.cpp
@@ +177,5 @@
>  bool
>  GetPreparsedData(HANDLE handle, nsTArray<uint8_t>& data)
>  {
>    UINT size;
> +  if (GetRawInputDeviceInfo(handle, RIDI_PREPARSEDDATA, nullptr, &size) == (UINT)-1) {

It might be nice to stick this in a constant at the top of the file, like:
const UINT kRawInputError = (UINT)-1;

Also, good job, Microsoft, putting -1 as the error return for a UINT-returning function.
Attachment #8475274 - Flags: review?(ted) → review+
Attached patch patch v1.1Splinter Review
Thanks for review, the attached version uses kRawInputError instead.

Jim, could you please review widget/ part?
Attachment #8481309 - Flags: review?(jmathies)
Attachment #8481309 - Flags: review?(jmathies) → review+
https://hg.mozilla.org/mozilla-central/rev/adca749eb686
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla35
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: