Bug 1223258 - Fix -Wunreachable-code warnings in widget. r=masayuki

widget/tests/TestAppShellSteadyState.cpp:397:5: warning: code will never be executed [-Wunreachable-code]
widget\widgetutils.cpp(95) : warning C4702: unreachable code
widget\mouseevents.h(97) : warning C4702: unreachable code
widget\textevents.h(492) : warning C4702: unreachable code
This commit is contained in:
Chris Peterson 2015-11-08 22:46:00 -08:00
parent 164d2cca6a
commit 3c9aff00b6
4 changed files with 2 additions and 5 deletions

View File

@ -94,7 +94,6 @@ public:
virtual WidgetEvent* Duplicate() const override
{
MOZ_CRASH("WidgetMouseEventBase must not be most-subclass");
return nullptr;
}
/// The possible related target

View File

@ -489,7 +489,6 @@ public:
NS_ASSERTION(!IsAllowedToDispatchDOMEvent(),
"WidgetQueryContentEvent needs to support Duplicate()");
MOZ_CRASH("WidgetQueryContentEvent doesn't support Duplicate()");
return nullptr;
}
void InitForQueryTextContent(uint32_t aOffset, uint32_t aLength,

View File

@ -92,7 +92,6 @@ nsIntRect RotateRect(nsIntRect aRect,
aRect.height, aRect.width);
default:
MOZ_CRASH("Unknown rotation");
return aRect;
}
}

View File

@ -391,8 +391,7 @@ Test4Internal(nsIAppShell* aAppShell)
#ifndef XP_WIN
// Not sure how to test on other platforms.
return false;
#endif
#else
nsCOMPtr<nsIAppShellService> appService =
do_GetService(NS_APPSHELLSERVICE_CONTRACTID);
if (!appService) {
@ -437,6 +436,7 @@ Test4Internal(nsIAppShell* aAppShell)
}
return true;
#endif
}
void