CompositorWidgetParent doesn't honor MOZ_MUST_USE on IPDL send methods

RESOLVED FIXED in Firefox 51

Status

()

Core
Widget: Win32
RESOLVED FIXED
a year ago
a year ago

People

(Reporter: froydnj, Assigned: froydnj)

Tracking

(Blocks: 1 bug)

unspecified
mozilla51
All
Windows
Points:
---

Firefox Tracking Flags

(firefox51 fixed)

Details

(Whiteboard: tpi:-)

Attachments

(1 attachment)

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     ^~~~~~~~~~~~~~~~~~

Updated

a year ago
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! :)
Created attachment 8789768 [details] [diff] [review]
explicitly ignore the result of Send{Observe,Unobserve}Vsync in CompositorWidgetParent
Attachment #8789768 - Flags: review?(jmathies)
Assignee: nobody → nfroyd

Updated

a year ago
Attachment #8789768 - Flags: review?(jmathies) → review+

Comment 5

a year ago
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

Comment 6

a year ago
Pushed by nfroyd@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/d43cca3b50a7
followup - fix silly typo; r=bustage

Comment 7

a year ago
bugherder
https://hg.mozilla.org/mozilla-central/rev/e95f8d487fbc
https://hg.mozilla.org/mozilla-central/rev/d43cca3b50a7
Status: NEW → RESOLVED
Last Resolved: a year ago
status-firefox51: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla51
You need to log in before you can comment on or make changes to this bug.