Closed
Bug 1521694
Opened 5 years ago
Closed 5 years ago
clang build warning: widget/windows/nsWindow.cpp(4688,13): warning: enumeration value 'nsSizeMode_Invalid' not handled in switch [-Wswitch]
Categories
(Core :: Widget: Win32, enhancement)
Tracking
()
RESOLVED
FIXED
mozilla66
Tracking | Status | |
---|---|---|
firefox66 | --- | fixed |
People
(Reporter: masayuki, Assigned: masayuki)
Details
Attachments
(1 file)
0:17.89 In file included from m:/fx64-dbg/widget/windows/Unified_cpp_widget_windows2.cpp:110:
0:17.89 m:/src/widget/windows/nsWindow.cpp(4688,13): warning: enumeration value 'nsSizeMode_Invalid' not handled in switch [-Wswitch
0:17.89 switch (sizeMode) {
0:17.89 ^
Assignee | ||
Comment 1•5 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=86f651b226c59a95797c3a5874daa52ef84996f7
Assignee | ||
Comment 2•5 years ago
|
||
DisplaySystemMenu() does not handle nsSizeMode_Invalid that causes warning of
clang. This patch makes it treat nsSizeMode_Invalid. When it receives the
value, it will call NS_ASSERTION() to be detectable on debug builds during
automated tests.
Additionally, this adds default case into the switch statement with
MOZ_ASSERT_UNREACHABLE(). Then, when somebody adds new nsSizeMode, they
can detect it with crash in debug build if they forget to change this method.
Pushed by masayuki@d-toybox.com: https://hg.mozilla.org/integration/autoland/rev/3883a443b7f8 Make DisplaySystemMenu() handle all nsSizeMode value r=jmathies
Comment 4•5 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 5 years ago
status-firefox66:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla66
You need to log in
before you can comment on or make changes to this bug.
Description
•