Bug 1217726 - Fix -Wimplicit-fallthrough warnings in dom/plugins. r=jimm

dom/plugins/base/nsNPAPIPlugin.cpp:1974:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/plugins/base/nsNPAPIPlugin.cpp:2200:3 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
dom/plugins/ipc/PluginInstanceChild.cpp:507:5 [-Wimplicit-fallthrough] unannotated fall-through between switch labels
This commit is contained in:
Chris Peterson 2015-10-06 21:20:20 -07:00
parent fe4db105c1
commit 012798f903
2 changed files with 4 additions and 11 deletions

View file

@ -693,7 +693,6 @@ AsyncCallbackAutoLock::~AsyncCallbackAutoLock()
} }
} }
NPP NPPStack::sCurrentNPP = nullptr; NPP NPPStack::sCurrentNPP = nullptr;
const char * const char *
@ -744,7 +743,6 @@ _geturl(NPP npp, const char* relativeURL, const char* target)
(strncmp(relativeURL, "ftp:", 4) != 0)) { (strncmp(relativeURL, "ftp:", 4) != 0)) {
nsNPAPIPluginInstance *inst = (nsNPAPIPluginInstance *) npp->ndata; nsNPAPIPluginInstance *inst = (nsNPAPIPluginInstance *) npp->ndata;
const char *name = nullptr; const char *name = nullptr;
RefPtr<nsPluginHost> host = nsPluginHost::GetInst(); RefPtr<nsPluginHost> host = nsPluginHost::GetInst();
host->GetPluginName(inst, &name); host->GetPluginName(inst, &name);
@ -1958,9 +1956,7 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
return NPERR_NO_ERROR; return NPERR_NO_ERROR;
} }
} }
else { return NPERR_GENERIC_ERROR;
return NPERR_GENERIC_ERROR;
}
} }
#ifndef NP_NO_QUICKDRAW #ifndef NP_NO_QUICKDRAW
@ -2189,14 +2185,13 @@ _getvalue(NPP npp, NPNVariable variable, void *result)
// we no longer hand out any XPCOM objects // we no longer hand out any XPCOM objects
case NPNVDOMElement: case NPNVDOMElement:
// fall through
case NPNVDOMWindow: case NPNVDOMWindow:
// fall through
case NPNVserviceManager: case NPNVserviceManager:
// old XPCOM objects, no longer supported, but null out the out // old XPCOM objects, no longer supported, but null out the out
// param to avoid crashing plugins that still try to use this. // param to avoid crashing plugins that still try to use this.
*(nsISupports**)result = nullptr; *(nsISupports**)result = nullptr;
// fall through MOZ_FALLTHROUGH;
default: default:
NPN_PLUGIN_LOG(PLUGIN_LOG_NORMAL, ("NPN_getvalue unhandled get value: %d\n", variable)); NPN_PLUGIN_LOG(PLUGIN_LOG_NORMAL, ("NPN_getvalue unhandled get value: %d\n", variable));
return NPERR_GENERIC_ERROR; return NPERR_GENERIC_ERROR;

View file

@ -502,6 +502,7 @@ PluginInstanceChild::NPN_GetValue(NPNVariable aVar,
case NPNVSupportsXEmbedBool: case NPNVSupportsXEmbedBool:
case NPNVSupportsWindowless: case NPNVSupportsWindowless:
NS_NOTREACHED("NPNVariable should be handled in PluginModuleChild."); NS_NOTREACHED("NPNVariable should be handled in PluginModuleChild.");
MOZ_FALLTHROUGH;
#endif #endif
default: default:
@ -510,7 +511,6 @@ PluginInstanceChild::NPN_GetValue(NPNVariable aVar,
(int) aVar, NPNVariableToString(aVar))); (int) aVar, NPNVariableToString(aVar)));
return NPERR_GENERIC_ERROR; return NPERR_GENERIC_ERROR;
} }
} }
#ifdef MOZ_WIDGET_COCOA #ifdef MOZ_WIDGET_COCOA
@ -2313,7 +2313,6 @@ PluginInstanceChild::EnumThreadWindowsCallback(HWND hWnd,
return TRUE; return TRUE;
} }
void void
PluginInstanceChild::SetupFlashMsgThrottle() PluginInstanceChild::SetupFlashMsgThrottle()
{ {
@ -2610,7 +2609,6 @@ StreamNotifyChild::ActorDestroy(ActorDestroyReason why)
} }
} }
void void
StreamNotifyChild::SetAssociatedStream(BrowserStreamChild* bs) StreamNotifyChild::SetAssociatedStream(BrowserStreamChild* bs)
{ {