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