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:
Daniel Holbert 2010-01-29 12:18:50 -08:00
parent 46d060dccd
commit 32a1fb0c00
5 changed files with 6 additions and 6 deletions

View File

@ -66,7 +66,7 @@ public:
virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error) = 0;
#endif
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,
void *aValue, NPError* error) = 0;
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(XP_OS2)

View File

@ -647,11 +647,11 @@ PluginModuleParent::NP_Shutdown(NPError* error)
}
nsresult
PluginModuleParent::NP_GetMIMEDescription(char** mimeDesc)
PluginModuleParent::NP_GetMIMEDescription(const char** mimeDesc)
{
PLUGIN_LOG_DEBUG_METHOD;
*mimeDesc = (char*)"application/x-foobar";
*mimeDesc = "application/x-foobar";
return NS_OK;
}

View File

@ -200,7 +200,7 @@ private:
virtual nsresult NP_Initialize(NPNetscapeFuncs* bFuncs, NPError* error);
#endif
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,
void *aValue, NPError* error);
#if defined(XP_WIN) || defined(XP_MACOSX) || defined(XP_OS2)

View File

@ -165,7 +165,7 @@ public:
return NS_OK;
}
virtual nsresult NP_GetMIMEDescription(char** mimeDesc) {
virtual nsresult NP_GetMIMEDescription(const char** mimeDesc) {
if (mNP_GetMIMEDescription) {
*mimeDesc = mNP_GetMIMEDescription();
}

View File

@ -663,7 +663,7 @@ nsNPAPIPlugin::Shutdown(void)
nsresult
nsNPAPIPlugin::GetMIMEDescription(const char* *resultingDesc)
{
nsresult gmdResult = fLibrary->NP_GetMIMEDescription((char**)resultingDesc);
nsresult gmdResult = fLibrary->NP_GetMIMEDescription(resultingDesc);
if (gmdResult != NS_OK) {
return gmdResult;
}