зеркало из https://github.com/mozilla/gecko-dev.git
Bug 542959: Add 'const' to NP_GetMIMEDescription's parameter, to fix "deprecated conversion from string constant to ‘char*’" warning. r=cjones
This commit is contained in:
Родитель
4d14a8f468
Коммит
6a765dabd8
|
@ -66,7 +66,7 @@ public:
|
||||||
virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error) = 0;
|
virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error) = 0;
|
||||||
#endif
|
#endif
|
||||||
virtual nsresult NP_Shutdown(NPError* error) = 0;
|
virtual nsresult NP_Shutdown(NPError* error) = 0;
|
||||||
virtual nsresult NP_GetMIMEDescription(char** mimeDesc) = 0;
|
virtual nsresult NP_GetMIMEDescription(const char** mimeDesc) = 0;
|
||||||
virtual nsresult NP_GetValue(void *future, NPPVariable aVariable,
|
virtual nsresult NP_GetValue(void *future, NPPVariable aVariable,
|
||||||
void *aValue, NPError* error) = 0;
|
void *aValue, NPError* error) = 0;
|
||||||
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(XP_OS2)
|
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(XP_OS2)
|
||||||
|
|
|
@ -647,11 +647,11 @@ PluginModuleParent::NP_Shutdown(NPError* error)
|
||||||
}
|
}
|
||||||
|
|
||||||
nsresult
|
nsresult
|
||||||
PluginModuleParent::NP_GetMIMEDescription(char** mimeDesc)
|
PluginModuleParent::NP_GetMIMEDescription(const char** mimeDesc)
|
||||||
{
|
{
|
||||||
PLUGIN_LOG_DEBUG_METHOD;
|
PLUGIN_LOG_DEBUG_METHOD;
|
||||||
|
|
||||||
*mimeDesc = (char*)"application/x-foobar";
|
*mimeDesc = "application/x-foobar";
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -200,7 +200,7 @@ private:
|
||||||
virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error);
|
virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error);
|
||||||
#endif
|
#endif
|
||||||
virtual nsresult NP_Shutdown(NPError* error);
|
virtual nsresult NP_Shutdown(NPError* error);
|
||||||
virtual nsresult NP_GetMIMEDescription(char** mimeDesc);
|
virtual nsresult NP_GetMIMEDescription(const char** mimeDesc);
|
||||||
virtual nsresult NP_GetValue(void *future, NPPVariable aVariable,
|
virtual nsresult NP_GetValue(void *future, NPPVariable aVariable,
|
||||||
void *aValue, NPError* error);
|
void *aValue, NPError* error);
|
||||||
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(XP_OS2)
|
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(XP_OS2)
|
||||||
|
|
|
@ -165,7 +165,7 @@ public:
|
||||||
return NS_OK;
|
return NS_OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
virtual nsresult NP_GetMIMEDescription(char** mimeDesc) {
|
virtual nsresult NP_GetMIMEDescription(const char** mimeDesc) {
|
||||||
if (mNP_GetMIMEDescription) {
|
if (mNP_GetMIMEDescription) {
|
||||||
*mimeDesc = mNP_GetMIMEDescription();
|
*mimeDesc = mNP_GetMIMEDescription();
|
||||||
}
|
}
|
||||||
|
|
|
@ -663,7 +663,7 @@ nsNPAPIPlugin::Shutdown(void)
|
||||||
nsresult
|
nsresult
|
||||||
nsNPAPIPlugin::GetMIMEDescription(const char* *resultingDesc)
|
nsNPAPIPlugin::GetMIMEDescription(const char* *resultingDesc)
|
||||||
{
|
{
|
||||||
nsresult gmdResult = fLibrary->NP_GetMIMEDescription((char**)resultingDesc);
|
nsresult gmdResult = fLibrary->NP_GetMIMEDescription(resultingDesc);
|
||||||
if (gmdResult != NS_OK) {
|
if (gmdResult != NS_OK) {
|
||||||
return gmdResult;
|
return gmdResult;
|
||||||
}
|
}
|
||||||
|
|
Загрузка…
Ссылка в новой задаче