Closed Bug 1296746 Opened 8 years ago Closed 8 years ago

CompositorWidgetParent doesn't honor MOZ_MUST_USE on IPDL send methods

Categories

(Core :: Widget: Win32, defect)

All
Windows
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla51
Tracking Status
firefox51 --- fixed

People

(Reporter: froydnj, Assigned: froydnj)

References

Details

(Whiteboard: tpi:-)

Attachments

(1 file)

clang-cl complains thusly:

11:30.66 c:/m-c/widget/windows/CompositorWidgetParent.cpp(59,5):  warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
11:30.66     SendObserveVsync();
11:30.66     ^~~~~~~~~~~~~~~~
11:30.66 c:/m-c/widget/windows/CompositorWidgetParent.cpp(61,5):  warning: ignoring return value of function declared with 'warn_unused_result' attribute [-Wunused-result]
11:30.66     SendUnobserveVsync();
11:30.66     ^~~~~~~~~~~~~~~~~~
Whiteboard: tpi:-
Why does this manifest as a warning instead of an error?
Flags: needinfo?(nfroyd)
(In reply to Nicholas Nethercote [:njn] from comment #1)
> Why does this manifest as a warning instead of an error?

This is Windows-only code, which means that as MSVC doesn't define anything useful for MOZ_MUST_USE, the problem goes undetected in our normal builds.  The warning comes from clang-cl, and would be a hard error in --enable-warnings-as-errors builds, which I was not doing.
Flags: needinfo?(nfroyd)
> This is Windows-only code

Makes sense. One more reason to get clang-cl builds up and running! :)
Assignee: nobody → nfroyd
Attachment #8789768 - Flags: review?(jmathies) → review+
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/e95f8d487fbc
explicitly ignore the result of Send{Observe,Unobserve}Vsync in CompositorWidgetParent; r=jimm
https://hg.mozilla.org/mozilla-central/rev/e95f8d487fbc
https://hg.mozilla.org/mozilla-central/rev/d43cca3b50a7
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: